Remove offline detection.
This commit is contained in:
parent
95e716f7f2
commit
df9e04f3ec
@ -961,10 +961,6 @@ Config =
|
|||||||
true
|
true
|
||||||
'Automatically fetch new posts.'
|
'Automatically fetch new posts.'
|
||||||
]
|
]
|
||||||
'Ignore Offline Status': [
|
|
||||||
true
|
|
||||||
'Update even if your browser reports you are offline.'
|
|
||||||
]
|
|
||||||
'Optional Increase': [
|
'Optional Increase': [
|
||||||
false
|
false
|
||||||
'Increase the intervals between updates on threads without new posts.'
|
'Increase the intervals between updates on threads without new posts.'
|
||||||
|
|||||||
@ -76,7 +76,6 @@ ThreadUpdater =
|
|||||||
|
|
||||||
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
|
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
|
||||||
|
|
||||||
$.on window, 'online offline', ThreadUpdater.cb.online
|
|
||||||
$.on d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost
|
$.on d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost
|
||||||
$.on d, 'visibilitychange', ThreadUpdater.cb.visibility
|
$.on d, 'visibilitychange', ThreadUpdater.cb.visibility
|
||||||
|
|
||||||
@ -89,18 +88,6 @@ ThreadUpdater =
|
|||||||
beep: 'data:audio/wav;base64,<%= grunt.file.read("src/General/audio/beep.wav", {encoding: "base64"}) %>'
|
beep: 'data:audio/wav;base64,<%= grunt.file.read("src/General/audio/beep.wav", {encoding: "base64"}) %>'
|
||||||
|
|
||||||
cb:
|
cb:
|
||||||
online: ->
|
|
||||||
return if ThreadUpdater.thread.isDead
|
|
||||||
|
|
||||||
if navigator.onLine
|
|
||||||
ThreadUpdater.set 'status', ''
|
|
||||||
else
|
|
||||||
ThreadUpdater.set 'status', 'Offline', 'warning'
|
|
||||||
|
|
||||||
if Conf['Auto Update'] and not Conf['Ignore Offline Status']
|
|
||||||
ThreadUpdater.outdateCount = 0
|
|
||||||
ThreadUpdater.setInterval()
|
|
||||||
|
|
||||||
checkpost: (e) ->
|
checkpost: (e) ->
|
||||||
return if e.detail.threadID isnt ThreadUpdater.thread.ID
|
return if e.detail.threadID isnt ThreadUpdater.thread.ID
|
||||||
ThreadUpdater.postID = e.detail.postID
|
ThreadUpdater.postID = e.detail.postID
|
||||||
@ -189,12 +176,6 @@ ThreadUpdater =
|
|||||||
ThreadUpdater.set 'timer', 'Update'
|
ThreadUpdater.set 'timer', 'Update'
|
||||||
return
|
return
|
||||||
|
|
||||||
unless navigator.onLine
|
|
||||||
ThreadUpdater.set 'status', 'Offline', 'warning'
|
|
||||||
unless Conf['Ignore Offline Status']
|
|
||||||
ThreadUpdater.set 'timer', ''
|
|
||||||
return
|
|
||||||
|
|
||||||
{interval} = ThreadUpdater
|
{interval} = ThreadUpdater
|
||||||
if Conf['Optional Increase']
|
if Conf['Optional Increase']
|
||||||
# Lower the max refresh rate limit on visible tabs.
|
# Lower the max refresh rate limit on visible tabs.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user