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

View File

@ -163,7 +163,7 @@ Config =
checkbox: checkbox:
'Beep': [false, 'Beep on new post to completely read thread.'] 'Beep': [false, 'Beep on new post to completely read thread.']
'Auto Scroll': [false, 'Scroll updated posts into view. Only enabled at bottom of page.'] '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.'] 'Scroll BG': [false, 'Auto-scroll background tabs.']
'Auto Update': [true, 'Automatically fetch new posts.'] 'Auto Update': [true, 'Automatically fetch new posts.']
'Interval': 30 'Interval': 30

View File

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