Fix Infinite Scrolling on Chrome.

This commit is contained in:
Zixaphir 2013-10-20 00:15:05 -07:00
parent dfb0ad23df
commit 6795148c14
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -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.