From 6795148c145a6b670c28f9d68cb07c116ae73534 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 20 Oct 2013 00:15:05 -0700 Subject: [PATCH] Fix Infinite Scrolling on Chrome. --- LICENSE | 2 +- builds/appchan-x.user.js | 4 ++-- builds/crx/script.js | 4 ++-- src/Miscellaneous/InfiniScroll.coffee | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 58675d16a..159aea719 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.5.0 - 2013-10-19 +* appchan x - Version 2.5.0 - 2013-10-20 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 40eff3c81..a59a34026 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -20,7 +20,7 @@ // ==/UserScript== /* -* appchan x - Version 2.5.0 - 2013-10-19 +* appchan x - Version 2.5.0 - 2013-10-20 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -13807,7 +13807,7 @@ scroll: $.debounce(100, function() { var url; - if (InfiniScroll.isFetching || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight))) { + if (InfiniScroll.isFetching || ((d.body.scrollTop || doc.scrollTop) <= doc.scrollHeight - (300 + window.innerHeight))) { return; } if (InfiniScroll.isDead) { diff --git a/builds/crx/script.js b/builds/crx/script.js index e23e3758f..2b013672c 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.5.0 - 2013-10-19 +* appchan x - Version 2.5.0 - 2013-10-20 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -13803,7 +13803,7 @@ scroll: $.debounce(100, function() { var url; - if (InfiniScroll.isFetching || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight))) { + if (InfiniScroll.isFetching || ((d.body.scrollTop || doc.scrollTop) <= doc.scrollHeight - (300 + window.innerHeight))) { return; } if (InfiniScroll.isDead) { diff --git a/src/Miscellaneous/InfiniScroll.coffee b/src/Miscellaneous/InfiniScroll.coffee index f8786a9ac..4579aff46 100644 --- a/src/Miscellaneous/InfiniScroll.coffee +++ b/src/Miscellaneous/InfiniScroll.coffee @@ -12,7 +12,7 @@ InfiniScroll = InfiniScroll.scroll() scroll: $.debounce 100, -> - return if InfiniScroll.isFetching or (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) + return if InfiniScroll.isFetching or ((d.body.scrollTop or doc.scrollTop) <= doc.scrollHeight - (300 + window.innerHeight)) return InfiniScroll.notice() if InfiniScroll.isDead # For once, lets respect 4chan's API rules.