From ea01038cbc9ea6e7586353464a7777282f252d4c Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 27 Nov 2011 18:35:03 +0100 Subject: [PATCH] Put thread creation auto-watch back. --- 4chan_x.user.js | 7 +++++++ script.coffee | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index cf51a0a50..4fb7aca1b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2058,6 +2058,13 @@ $.before(input, favicon); } watcher.refresh(); + if (conf['Auto Watch']) { + if (!g.REPLY) { + $('.postarea form').action += '?watch'; + } else if (/watch/.test(location.search) && $('img.favicon').src === Favicon.empty) { + watcher.watch(null, g.THREAD_ID); + } + } return $.on(window, 'storage', function(e) { if (e.key === ("" + NAMESPACE + "watched")) return watcher.refresh(); }); diff --git a/script.coffee b/script.coffee index f48f6ac61..d3fda7402 100644 --- a/script.coffee +++ b/script.coffee @@ -1635,6 +1635,12 @@ watcher = #populate watcher, display watch buttons watcher.refresh() + if conf['Auto Watch'] + unless g.REPLY + $('.postarea form').action += '?watch' + else if /watch/.test(location.search) and $('img.favicon').src is Favicon.empty + watcher.watch null, g.THREAD_ID + $.on window, 'storage', (e) -> watcher.refresh() if e.key is "#{NAMESPACE}watched" refresh: ->