Remove auto-update this
This commit is contained in:
parent
bf8bfa7dbf
commit
732320893e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -406,8 +406,8 @@ a.hide-announcement {
|
|||||||
.new {
|
.new {
|
||||||
color: limegreen;
|
color: limegreen;
|
||||||
}
|
}
|
||||||
#update-status, #update-timer, #post-count, #file-count {
|
#update-status:not(.null) {
|
||||||
pointer-events: none;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Thread Watcher */
|
/* Thread Watcher */
|
||||||
|
|||||||
@ -4,8 +4,7 @@ ThreadUpdater =
|
|||||||
|
|
||||||
checked = if Conf['Auto Update'] then 'checked' else ''
|
checked = if Conf['Auto Update'] then 'checked' else ''
|
||||||
@dialog = sc = $.el 'span',
|
@dialog = sc = $.el 'span',
|
||||||
innerHTML: "
|
innerHTML: "<span id=update-status></span><span id=update-timer></span>"
|
||||||
<input name='Auto Update This' type=checkbox #{checked}><span id=update-status></span> <span id=update-timer></span>"
|
|
||||||
id: 'updater'
|
id: 'updater'
|
||||||
|
|
||||||
@timer = $ '#update-timer', sc
|
@timer = $ '#update-timer', sc
|
||||||
@ -58,12 +57,6 @@ ThreadUpdater =
|
|||||||
|
|
||||||
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
|
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
|
||||||
|
|
||||||
input = $ 'input', ThreadUpdater.dialog
|
|
||||||
|
|
||||||
$.on input, 'change', $.cb.checked
|
|
||||||
$.on input, 'change', ThreadUpdater.cb.autoUpdate
|
|
||||||
$.event 'change', null, input
|
|
||||||
|
|
||||||
$.on window, 'online offline', ThreadUpdater.cb.online
|
$.on window, 'online offline', ThreadUpdater.cb.online
|
||||||
$.on d, 'QRPostSuccessful', ThreadUpdater.cb.post
|
$.on d, 'QRPostSuccessful', ThreadUpdater.cb.post
|
||||||
$.on d, 'visibilitychange', ThreadUpdater.cb.visibility
|
$.on d, 'visibilitychange', ThreadUpdater.cb.visibility
|
||||||
@ -81,14 +74,14 @@ ThreadUpdater =
|
|||||||
if ThreadUpdater.online = navigator.onLine
|
if ThreadUpdater.online = navigator.onLine
|
||||||
ThreadUpdater.outdateCount = 0
|
ThreadUpdater.outdateCount = 0
|
||||||
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
|
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
|
||||||
ThreadUpdater.update() if Conf['Auto Update This']
|
ThreadUpdater.update()
|
||||||
ThreadUpdater.set 'status', null, null
|
ThreadUpdater.set 'status', null, null
|
||||||
else
|
else
|
||||||
ThreadUpdater.set 'timer', null
|
ThreadUpdater.set 'timer', null
|
||||||
ThreadUpdater.set 'status', 'Offline', 'warning'
|
ThreadUpdater.set 'status', 'Offline', 'warning'
|
||||||
ThreadUpdater.cb.autoUpdate()
|
ThreadUpdater.cb.autoUpdate()
|
||||||
post: (e) ->
|
post: (e) ->
|
||||||
return unless Conf['Auto Update This'] and e.detail.threadID is ThreadUpdater.thread.ID
|
return unless e.detail.threadID is ThreadUpdater.thread.ID
|
||||||
ThreadUpdater.outdateCount = 0
|
ThreadUpdater.outdateCount = 0
|
||||||
setTimeout ThreadUpdater.update, 1000 if ThreadUpdater.seconds > 2
|
setTimeout ThreadUpdater.update, 1000 if ThreadUpdater.seconds > 2
|
||||||
checkpost: ->
|
checkpost: ->
|
||||||
@ -109,7 +102,7 @@ ThreadUpdater =
|
|||||||
else
|
else
|
||||||
-> not d.hidden
|
-> not d.hidden
|
||||||
autoUpdate: ->
|
autoUpdate: ->
|
||||||
if Conf['Auto Update This'] and ThreadUpdater.online
|
if ThreadUpdater.online
|
||||||
ThreadUpdater.timeoutID = setTimeout ThreadUpdater.timeout, 1000
|
ThreadUpdater.timeoutID = setTimeout ThreadUpdater.timeout, 1000
|
||||||
else
|
else
|
||||||
clearTimeout ThreadUpdater.timeoutID
|
clearTimeout ThreadUpdater.timeoutID
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user