From bbb41dd2262add4ce53919224d2a6e4787a4f7f7 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 9 Mar 2014 16:04:16 -0700 Subject: [PATCH] Threadupdater stuff --- builds/4chan-X.user.js | 10 ++++------ builds/crx/script.js | 10 ++++------ src/Monitoring/ThreadUpdater.coffee | 10 +++++----- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index fbfd3bd49..396d4cf56 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9457,12 +9457,10 @@ } else { this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "
"); $.addClass(doc, 'float'); - $.ready((function(_this) { - return function() { - $.addClass(doc, 'float'); - return $.add(d.body, sc); - }; - })(this)); + $.ready(function() { + $.addClass(doc, 'float'); + return $.add(d.body, sc); + }); } this.checkPostCount = 0; this.timer = $('#update-timer', sc); diff --git a/builds/crx/script.js b/builds/crx/script.js index 12327aa39..b94eedd28 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9472,12 +9472,10 @@ } else { this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "
"); $.addClass(doc, 'float'); - $.ready((function(_this) { - return function() { - $.addClass(doc, 'float'); - return $.add(d.body, sc); - }; - })(this)); + $.ready(function() { + $.addClass(doc, 'float'); + return $.add(d.body, sc); + }); } this.checkPostCount = 0; this.timer = $('#update-timer', sc); diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index e8d77e420..019970a70 100755 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -8,11 +8,11 @@ ThreadUpdater = id: 'updater' $.ready -> Header.addShortcut sc - else + else @dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;', "
" $.addClass doc, 'float' - $.ready => + $.ready -> $.addClass doc, 'float' $.add d.body, sc @@ -57,12 +57,12 @@ ThreadUpdater = Thread.callbacks.push name: 'Thread Updater' cb: @node - + disconnect: -> return if g.VIEW isnt 'thread' or !Conf['Thread Updater'] $.off @timer, 'click', @update $.off @status, 'click', @update - + clearTimeout @timeoutID if @timeoutID for entry in @entry.subEntries @@ -182,7 +182,7 @@ ThreadUpdater = setInterval: -> i = ThreadUpdater.interval + 1 - + if Conf['Optional Increase'] # Lower the max refresh rate limit on visible tabs. cur = ThreadUpdater.outdateCount or 1