Created
July 30, 2018 02:14
-
-
Save adam-acosta/628783cff5d28703fc511a717dac528d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lastScrollHeight = 0; | |
function autoScroll() { | |
var sh = document.documentElement.scrollHeight; | |
if (sh != lastScrollHeight) { | |
lastScrollHeight = sh; | |
document.documentElement.scrollTop = sh; | |
} | |
} | |
window.setInterval(autoScroll, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment