Put thread creation auto-watch back.

This commit is contained in:
Nicolas Stepien 2011-11-27 18:35:03 +01:00
parent f57cfb1fe0
commit ea01038cbc
2 changed files with 13 additions and 0 deletions

View File

@ -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();
});

View File

@ -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: ->