From 093bbc9905134738d85870fc8622be43fd26f8fa Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 22 Jul 2019 17:46:15 -0700 Subject: [PATCH] Fix exception when Thread Watcher keybind pressed on Tinyboard/vichan sites. --- src/Miscellaneous/Keybinds.coffee | 2 +- src/Monitoring/ThreadUpdater.coffee | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 45a0ca636..00a702ea4 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -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' diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index d4cbf5abc..de4a9f460 100644 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -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.