From d31ec005f816435bce5cd84c8b7ad0a7da5a7a27 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 5 May 2011 19:28:30 +0200 Subject: [PATCH] Aeosynth you dummy. --- 4chan_x.js | 5 +++-- script.coffee | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 05a67438e..d9baf6527 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1482,7 +1482,7 @@ } watcher.refresh($.getValue('watched', {})); return setInterval((function() { - if (Date.now() > $.getValue('watcher.lastUpdated', 0)) { + if (watcher.lastUpdated < $.getValue('watcher.lastUpdated', 0)) { return watcher.refresh($.getValue('watched', {})); } }), 1000); @@ -1512,7 +1512,8 @@ favicon.src = Favicon.empty; } } - return $.setValue('watcher.lastUpdated', Date.now()); + $.setValue('watcher.lastUpdated', Date.now()); + return watcher.lastUpdated = Date.now(); }, addLink: function(props, dialog) { var div, link, x; diff --git a/script.coffee b/script.coffee index e3760ab50..4cfe35c36 100644 --- a/script.coffee +++ b/script.coffee @@ -1179,7 +1179,7 @@ watcher = watcher.refresh $.getValue 'watched', {} setInterval (-> - if Date.now() > $.getValue 'watcher.lastUpdated', 0 + if watcher.lastUpdated < $.getValue 'watcher.lastUpdated', 0 watcher.refresh($.getValue 'watched', {}) ), 1000 @@ -1197,6 +1197,7 @@ watcher = else favicon.src = Favicon.empty $.setValue 'watcher.lastUpdated', Date.now() + watcher.lastUpdated = Date.now() addLink: (props, dialog) -> div = $.el 'div'