Fix exception when Thread Watcher keybind pressed on Tinyboard/vichan sites.

This commit is contained in:
ccd0 2019-07-22 17:46:15 -07:00
parent 8688bfc955
commit 093bbc9905
2 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,7 @@ Keybinds =
when Conf['Update']
switch g.VIEW
when 'thread'
return unless Conf['Thread Updater']
return unless ThreadUpdater.enabled
ThreadUpdater.update()
when 'index'
return unless Conf['JSON Index'] and g.BOARD.ID isnt 'f'

View File

@ -1,6 +1,7 @@
ThreadUpdater =
init: ->
return if g.VIEW isnt 'thread' or !Conf['Thread Updater']
@enabled = true
# Chromium won't play audio created in an inactive tab until the tab has been focused, so set it up now.
# XXX Sometimes the loading stalls in Firefox, esp. when opening in private browsing window followed by normal window.