From f6de1520cea5ff1594b8db7a028855b926125ac0 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 10 May 2013 04:29:21 -0700 Subject: [PATCH] Fix seaweedchan/4chan-x/issues/62 --- builds/4chan-X.js | 2 +- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/General/Header.coffee | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builds/4chan-X.js b/builds/4chan-X.js index fe4dad5b4..f777e4c55 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -1771,7 +1771,7 @@ headRect = Header.bar.getBoundingClientRect(); top += -headRect.top - headRect.height; } - return ($.engine === 'webkit' ? d.body : doc).scrollTop += top; + return doc.scrollTop += top; }, addShortcut: function(el) { var shortcut; diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index ec9ee739a..12c5b8060 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1767,7 +1767,7 @@ headRect = Header.bar.getBoundingClientRect(); top += -headRect.top - headRect.height; } - return ($.engine === 'webkit' ? d.body : doc).scrollTop += top; + return doc.scrollTop += top; }, addShortcut: function(el) { var shortcut; diff --git a/builds/crx/script.js b/builds/crx/script.js index 6747bb87c..f3d594e73 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1769,7 +1769,7 @@ headRect = Header.bar.getBoundingClientRect(); top += -headRect.top - headRect.height; } - return ($.engine === 'webkit' ? d.body : doc).scrollTop += top; + return d.body.scrollTop += top; }, addShortcut: function(el) { var shortcut; diff --git a/src/General/Header.coffee b/src/General/Header.coffee index 95c0d4e7c..4f4c6d1d1 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -303,7 +303,7 @@ Header = if Conf['Fixed Header'] and not Conf['Bottom Header'] headRect = Header.bar.getBoundingClientRect() top += - headRect.top - headRect.height - (if $.engine is 'webkit' then d.body else doc).scrollTop += top + <% if (type === 'crx') { %>d.body<% } else { %>doc<% } %>.scrollTop += top addShortcut: (el) -> shortcut = $.el 'span',