Threadupdater stuff

This commit is contained in:
Zixaphir 2014-03-09 16:04:16 -07:00
parent f96e046af4
commit bbb41dd226
3 changed files with 13 additions and 17 deletions

View File

@ -9457,12 +9457,10 @@
} else {
this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>");
$.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);

View File

@ -9472,12 +9472,10 @@
} else {
this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>");
$.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);

View File

@ -8,11 +8,11 @@ ThreadUpdater =
id: 'updater'
$.ready ->
Header.addShortcut sc
else
else
@dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;',
"<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>"
$.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