window.scrollY works in Chrome and Firefox.

This commit is contained in:
Zixaphir 2014-03-13 02:07:26 -07:00
parent 0f0c50ca33
commit b46dc96b52
3 changed files with 6 additions and 6 deletions

View File

@ -2706,8 +2706,8 @@
return $.rmClass(doc, 'index-loading');
});
},
scroll: $.debounce(100, function() {
if (Index.req || Conf['Index Mode'] !== 'infinite' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
scroll: $.debounce(500, function() {
if (Index.req || Conf['Index Mode'] !== 'infinite' || (window.scrollY <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
return;
}
Index.pageNum = (Index.pageNum || Index.getCurrentPage()) + 1;

View File

@ -2765,8 +2765,8 @@
return $.rmClass(doc, 'index-loading');
});
},
scroll: $.debounce(100, function() {
if (Index.req || Conf['Index Mode'] !== 'infinite' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
scroll: $.debounce(500, function() {
if (Index.req || Conf['Index Mode'] !== 'infinite' || (window.scrollY <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
return;
}
Index.pageNum = (Index.pageNum || Index.getCurrentPage()) + 1;

View File

@ -151,8 +151,8 @@ Index =
$.after $.id('delform'), Index.pagelist
$.rmClass doc, 'index-loading'
scroll: $.debounce 100, ->
return if Index.req or Conf['Index Mode'] isnt 'infinite' or (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) or g.VIEW is 'thread'
scroll: $.debounce 500, ->
return if Index.req or Conf['Index Mode'] isnt 'infinite' or (window.scrollY <= doc.scrollHeight - (300 + window.innerHeight)) or g.VIEW is 'thread'
Index.pageNum = (Index.pageNum or Index.getCurrentPage()) + 1 # Avoid having to pushState to keep track of the current page
return Index.endNotice() if Index.pageNum >= Index.pagesNum