From 2da04a635b34f0779a26bfa277d5c6dde4039a2a Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 23 Mar 2014 14:28:42 -0700 Subject: [PATCH] Thread Updater Increment issue. --- builds/4chan-X.user.js | 9 ++++++--- builds/crx/script.js | 9 ++++++--- src/Monitoring/ThreadUpdater.coffee | 8 +++++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 97c1ad627..9bdd85bea 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9597,7 +9597,8 @@ ThreadUpdater.root = this.OP.nodes.root.parentNode; ThreadUpdater.lastPost = +this.posts.keys[this.posts.keys.length - 1]; ThreadUpdater.cb.interval.call($.el('input', { - value: Conf['Interval'] + value: Conf['Interval'], + name: 'Interval' })); $.on(window, 'online offline', ThreadUpdater.cb.online); $.on(d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost); @@ -9663,14 +9664,16 @@ return !d.hidden; }; }, - interval: function() { + interval: function(e) { var val; val = parseInt(this.value, 10); if (val < 1) { val = 1; } ThreadUpdater.interval = this.value = val; - return $.cb.value.call(this); + if (e) { + return $.cb.value.call(this); + } }, load: function(e) { var klass, req, text, _ref; diff --git a/builds/crx/script.js b/builds/crx/script.js index adb9060f0..1e4c864fc 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9612,7 +9612,8 @@ ThreadUpdater.root = this.OP.nodes.root.parentNode; ThreadUpdater.lastPost = +this.posts.keys[this.posts.keys.length - 1]; ThreadUpdater.cb.interval.call($.el('input', { - value: Conf['Interval'] + value: Conf['Interval'], + name: 'Interval' })); $.on(window, 'online offline', ThreadUpdater.cb.online); $.on(d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost); @@ -9678,14 +9679,16 @@ return !d.hidden; }; }, - interval: function() { + interval: function(e) { var val; val = parseInt(this.value, 10); if (val < 1) { val = 1; } ThreadUpdater.interval = this.value = val; - return $.cb.value.call(this); + if (e) { + return $.cb.value.call(this); + } }, load: function(e) { var klass, req, text, _ref; diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index d35d187cb..59208ff4a 100755 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -97,7 +97,9 @@ ThreadUpdater = ThreadUpdater.root = @OP.nodes.root.parentNode ThreadUpdater.lastPost = +@posts.keys[@posts.keys.length - 1] - ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval'] + ThreadUpdater.cb.interval.call $.el 'input', + value: Conf['Interval'] + name: 'Interval' $.on window, 'online offline', ThreadUpdater.cb.online $.on d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost @@ -147,11 +149,11 @@ ThreadUpdater = -> true else -> not d.hidden - interval: -> + interval: (e) -> val = parseInt @value, 10 if val < 1 then val = 1 ThreadUpdater.interval = @value = val - $.cb.value.call @ + $.cb.value.call @ if e load: (e) -> {req} = ThreadUpdater switch req.status