Turn thread watcher refreshing off outside 4chan until working.
This commit is contained in:
parent
06c1ae29e3
commit
4acfec4d12
@ -24,6 +24,8 @@ ThreadWatcher =
|
|||||||
$.on @refreshButton, 'click', @buttonFetchAll
|
$.on @refreshButton, 'click', @buttonFetchAll
|
||||||
$.on @closeButton, 'click', @toggleWatcher
|
$.on @closeButton, 'click', @toggleWatcher
|
||||||
|
|
||||||
|
@refreshButton.hidden = true unless Site.software is 'yotsuba'
|
||||||
|
|
||||||
@menu.addHeaderMenuEntry()
|
@menu.addHeaderMenuEntry()
|
||||||
$.onExists doc, 'body', @addDialog
|
$.onExists doc, 'body', @addDialog
|
||||||
|
|
||||||
@ -179,6 +181,7 @@ ThreadWatcher =
|
|||||||
ThreadWatcher.clearRequests()
|
ThreadWatcher.clearRequests()
|
||||||
|
|
||||||
fetchAuto: ->
|
fetchAuto: ->
|
||||||
|
return unless Site.software is 'yotsuba'
|
||||||
clearTimeout ThreadWatcher.timeout
|
clearTimeout ThreadWatcher.timeout
|
||||||
return unless Conf['Auto Update Thread Watcher']
|
return unless Conf['Auto Update Thread Watcher']
|
||||||
{db} = ThreadWatcher
|
{db} = ThreadWatcher
|
||||||
@ -196,6 +199,7 @@ ThreadWatcher =
|
|||||||
ThreadWatcher.fetchAllStatus()
|
ThreadWatcher.fetchAllStatus()
|
||||||
|
|
||||||
fetchAllStatus: ->
|
fetchAllStatus: ->
|
||||||
|
return unless Site.software is 'yotsuba'
|
||||||
dbs = [ThreadWatcher.db, ThreadWatcher.unreaddb, QuoteYou.db].filter((x) -> x)
|
dbs = [ThreadWatcher.db, ThreadWatcher.unreaddb, QuoteYou.db].filter((x) -> x)
|
||||||
n = 0
|
n = 0
|
||||||
for db in dbs
|
for db in dbs
|
||||||
@ -207,6 +211,7 @@ ThreadWatcher =
|
|||||||
return
|
return
|
||||||
|
|
||||||
fetchStatus: (thread, force) ->
|
fetchStatus: (thread, force) ->
|
||||||
|
return unless Site.software is 'yotsuba'
|
||||||
{boardID, threadID, data} = thread
|
{boardID, threadID, data} = thread
|
||||||
return if data.isDead and not force
|
return if data.isDead and not force
|
||||||
if ThreadWatcher.requests.length is 0
|
if ThreadWatcher.requests.length is 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user