window.scrollY works in Chrome and Firefox.

Conflicts:
	builds/4chan-X.user.js
	builds/crx/script.js
	src/General/Index.coffee
This commit is contained in:
Zixaphir 2014-03-13 02:07:26 -07:00 committed by ccd0
parent 32fbc2c24c
commit bb3deb62bd

View File

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