diff --git a/4chan_x.js b/4chan_x.js
index 0de870b65..08772dbc7 100644
--- a/4chan_x.js
+++ b/4chan_x.js
@@ -1464,7 +1464,7 @@
};
watcher = {
init: function() {
- var dialog, favicon, html, input, inputs, watched, _i, _len;
+ var dialog, favicon, html, input, inputs, _i, _len;
html = '
Thread Watcher
';
dialog = ui.dialog('watcher', {
top: '50px',
@@ -1480,8 +1480,10 @@
$.bind(favicon, 'click', watcher.cb.toggle);
$.before(input, favicon);
}
- watched = $.getValue('watched', {});
- return watcher.refresh(watched);
+ watcher.refresh($.getValue('watched', {}));
+ return setInterval((function() {
+ return watcher.refresh($.getValue('watched', {}));
+ }), 1000);
},
refresh: function(watched) {
var board, div, favicon, id, props, watchedBoard, _i, _j, _len, _len2, _ref, _ref2, _ref3, _results;
diff --git a/script.coffee b/script.coffee
index d52872294..b90bb1115 100644
--- a/script.coffee
+++ b/script.coffee
@@ -1176,8 +1176,9 @@ watcher =
$.before input, favicon
#populate watcher, display watch buttons
- watched = $.getValue 'watched', {}
- watcher.refresh watched
+ watcher.refresh $.getValue 'watched', {}
+
+ setInterval (-> watcher.refresh($.getValue 'watched', {}) ), 1000
refresh: (watched) ->
for div in $$ '#watcher > div:not(.move)'