IRC Updating

This commit is contained in:
James Campos 2011-07-20 14:05:28 -07:00
parent 3f325c6ee5
commit a2e6d2da24
2 changed files with 10 additions and 5 deletions

View File

@ -89,6 +89,7 @@
},
Monitoring: {
'Thread Updater': [true, 'Update threads'],
'IRC Updating': [false, 'Scroll updated posts into view'],
'Unread Count': [true, 'Show unread post count in tab title'],
'Post in Title': [true, 'Show the op\'s post in the tab title'],
'Thread Stats': [true, 'Display reply and image count'],
@ -1617,7 +1618,7 @@
}
},
update: function(e) {
var arr, body, br, id, input, replies, reply, _i, _len, _ref, _ref2, _results;
var arr, body, br, id, input, replies, reply, _i, _len, _ref, _ref2;
if (this.status === 404) {
updater.timer.textContent = '';
updater.count.textContent = 404;
@ -1653,11 +1654,12 @@
updater.count.className = 'new';
}
}
_results = [];
while (reply = arr.pop()) {
_results.push($.before(br, reply));
$.before(br, reply);
}
if ($.config('IRC Updating')) {
return scrollTo(0, d.body.scrollHeight);
}
return _results;
}
},
timeout: function() {

View File

@ -23,6 +23,7 @@ config =
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
Monitoring:
'Thread Updater': [true, 'Update threads']
'IRC Updating': [false, 'Scroll updated posts into view']
'Unread Count': [true, 'Show unread post count in tab title']
'Post in Title': [true, 'Show the op\'s post in the tab title']
'Thread Stats': [true, 'Display reply and image count']
@ -1348,9 +1349,11 @@ updater =
else
updater.count.className = 'new'
#XXX add replies in correct order so /b/acklinks resolve
#XXX add replies in correct order so backlinks resolve
while reply = arr.pop()
$.before br, reply
if $.config 'IRC Updating'
scrollTo 0, d.body.scrollHeight
timeout: ->
n = Number updater.timer.textContent