Inconsistency, fix for non-webkit browsers.

This commit is contained in:
Nicolas Stepien 2013-02-21 01:06:35 +01:00
parent d9e3e7d55c
commit d827a6c317
3 changed files with 6 additions and 6 deletions

View File

@ -170,7 +170,7 @@
checkbox: {
'Beep': [false, 'Beep on new post to completely read thread.'],
'Auto Scroll': [false, 'Scroll updated posts into view. Only enabled at bottom of page.'],
'Bottom scroll': [false, 'Always scroll to the bottom, not the first new post. Useful for event threads.'],
'Bottom Scroll': [false, 'Always scroll to the bottom, not the first new post. Useful for event threads.'],
'Scroll BG': [false, 'Auto-scroll background tabs.'],
'Auto Update': [true, 'Automatically fetch new posts.']
},
@ -5225,8 +5225,8 @@
scroll = Conf['Auto Scroll'] && ThreadUpdater.scrollBG() && ThreadUpdater.root.getBoundingClientRect().bottom - doc.clientHeight < 25;
$.add(ThreadUpdater.root, nodes);
if (scroll) {
if (Conf['Bottom scroll']) {
d.body.scrollTop = d.body.clientHeight;
if (Conf['Bottom Scroll']) {
($.engine === 'webkit' ? d.body : doc).scrollTop = d.body.clientHeight;
} else {
nodes[0].scrollIntoView();
}

View File

@ -163,7 +163,7 @@ Config =
checkbox:
'Beep': [false, 'Beep on new post to completely read thread.']
'Auto Scroll': [false, 'Scroll updated posts into view. Only enabled at bottom of page.']
'Bottom scroll': [false, 'Always scroll to the bottom, not the first new post. Useful for event threads.']
'Bottom Scroll': [false, 'Always scroll to the bottom, not the first new post. Useful for event threads.']
'Scroll BG': [false, 'Auto-scroll background tabs.']
'Auto Update': [true, 'Automatically fetch new posts.']
'Interval': 30

View File

@ -3531,8 +3531,8 @@ ThreadUpdater =
ThreadUpdater.root.getBoundingClientRect().bottom - doc.clientHeight < 25
$.add ThreadUpdater.root, nodes
if scroll
if Conf['Bottom scroll']
d.body.scrollTop = d.body.clientHeight
if Conf['Bottom Scroll']
(if $.engine is 'webkit' then d.body else doc).scrollTop = d.body.clientHeight
else
nodes[0].scrollIntoView()