Created
November 29, 2017 11:02
-
-
Save jkfran/f59bb94d7ac469920e9d9978d8efe987 to your computer and use it in GitHub Desktop.
Paste this code in javascript console to scroll to the end.
This file contains hidden or 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
function scrollToBottom(){ | |
bottom = document.body.scrollHeight; | |
current = window.innerHeight+ document.body.scrollTop; | |
if((bottom-current) >0){ | |
window.scrollTo(0, bottom); | |
setTimeout ('scrollToBottom()', 1000); | |
} | |
}; | |
scrollToBottom(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment