This commit is contained in:
James Campos 2010-10-28 06:41:52 -07:00
parent 29397ea4b4
commit a37143615d

View File

@ -3,6 +3,7 @@
#todo: watch - add board in updateWatcher?, redundant move divs?, redo css / hiding, manual clear #todo: watch - add board in updateWatcher?, redundant move divs?, redo css / hiding, manual clear
# #
#TODO - 4chan time #TODO - 4chan time
#addClass, removeClass; remove hide / show; makeDialog el, 'center'
config = config =
'Thread Hiding': true 'Thread Hiding': true
@ -13,11 +14,11 @@ config =
'Thread Watcher': true 'Thread Watcher': true
'Thread Expansion': true 'Thread Expansion': true
'Comment Expansion': true 'Comment Expansion': true
'Quick Report': true
'Quick Reply': true 'Quick Reply': true
'Persistent QR': false 'Persistent QR': false
'Quick Report': true
'Auto Watch': true
'Anonymize': false 'Anonymize': false
'Auto Watch': true
'404 Redirect': true '404 Redirect': true
'Post in Title': true 'Post in Title': true
'Sauce': true 'Sauce': true
@ -196,7 +197,7 @@ if location.hostname.split('.')[0] is 'sys'
GM_setValue('error', '') GM_setValue('error', '')
if getConfig 'Auto Watch' if getConfig 'Auto Watch'
html = $('b').innerHTML html = $('b').innerHTML
[nop, thread, id] = html.match(/<!-- thread:(\d+),no:(\d+) -->/) [_, thread, id] = html.match(/<!-- thread:(\d+),no:(\d+) -->/)
if thread is '0' if thread is '0'
board = $('meta', d).content.match(/4chan.org\/(\w+)\//)[1] board = $('meta', d).content.match(/4chan.org\/(\w+)\//)[1]
watched[board] or= [] watched[board] or= []
@ -323,8 +324,7 @@ editSauce = ->
if ta.style.display then show ta else hide ta if ta.style.display then show ta else hide ta
options = -> options = ->
#redo this if div = $ '#options'
if div = $('#options')
remove div remove div
else else
div = AEOS.makeDialog 'options', 'center' div = AEOS.makeDialog 'options', 'center'
@ -580,7 +580,7 @@ watch = ->
watchX = -> watchX = ->
[board, nop, id] = [board, _, id] =
this.nextElementSibling.getAttribute('href').substring(1).split('/') this.nextElementSibling.getAttribute('href').substring(1).split('/')
watched[board] = slice(watched[board], id) watched[board] = slice(watched[board], id)
GM_setValue('watched', JSON.stringify(watched)) GM_setValue('watched', JSON.stringify(watched))
@ -666,7 +666,7 @@ expandThread = ->
onloadComment = (responseText, a, href) -> onloadComment = (responseText, a, href) ->
[nop, op, id] = href.match(/(\d+)#(\d+)/) [_, op, id] = href.match(/(\d+)#(\d+)/)
[replies, opbq] = parseResponse(responseText) [replies, opbq] = parseResponse(responseText)
if id is op if id is op
html = opbq.innerHTML html = opbq.innerHTML