From bb3deb62bdc55563c7852d71b5d0132ecd4a4855 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Thu, 13 Mar 2014 02:07:26 -0700 Subject: [PATCH] window.scrollY works in Chrome and Firefox. Conflicts: builds/4chan-X.user.js builds/crx/script.js src/General/Index.coffee --- src/General/Index.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index f321d7585..780a8ca62 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -121,8 +121,8 @@ Index = $('.returnlink a', Index.navLinks).href = $('.returnlink a', Index.navLinksBot).href = "//boards.4chan.org/#{g.BOARD}/" $('.cataloglink a', Index.navLinks).href = $('.cataloglink a', Index.navLinksBot).href = "//boards.4chan.org/#{g.BOARD}/catalog" - 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.getCurrentPage() unless Index.pageNum? # Avoid having to pushState to keep track of the current page pageNum = Index.pageNum++