From b4169832c6bb9e75d5d21cc5c332ddfd1f6120e5 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 6 May 2011 23:59:29 -0700 Subject: [PATCH] better auto-watch condition --- 4chan_x.js | 4 ++-- script.coffee | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 0ffc85079..198baec1f 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -2184,8 +2184,8 @@ if ($.config('Unread Count')) { unread.init(); } - if ($.config('Auto Watch') && location.hash === '#watch') { - watcher.watch($('body > form'), $('form > input[value=delete]').name); + if ($.config('Auto Watch') && $.config('Thread Watcher') && location.hash === '#watch' && $('img.favicon').src === Favicon.empty) { + watcher.watch(null, g.THREAD_ID); } } else { threading.init(); diff --git a/script.coffee b/script.coffee index 0eb8585cb..09dc87bc3 100644 --- a/script.coffee +++ b/script.coffee @@ -1697,8 +1697,9 @@ main = if $.config 'Unread Count' unread.init() - if $.config('Auto Watch') and location.hash is '#watch' - watcher.watch($('body > form'), $('form > input[value=delete]').name) + if $.config('Auto Watch') and $.config('Thread Watcher') and + location.hash is '#watch' and $('img.favicon').src is Favicon.empty + watcher.watch null, g.THREAD_ID else #not reply threading.init()