Created
November 2, 2019 18:47
-
-
Save iosonosempreio/1238f9d52e5d64c41d21f2b3cfd179ed 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
// Let the page load completely | |
// Open the console (in Chrome or similar do View > Developer > JavaScript Console) | |
// paste the following code | |
let scrollingInterval; | |
function scrolling(pixels) { | |
if (pixels == 'stop' || pixels == 0) { | |
clearInterval(scrollingInterval); | |
return; | |
} | |
if (!pixels) { | |
pixels = 1; | |
} | |
clearInterval(scrollingInterval); | |
scrollingInterval = setInterval(function(){ | |
window.scrollBy(0,pixels); | |
}, 1); | |
} | |
// use it this way (don't paste the following) | |
// scrolling(1) //the number roughtly indicates the speed | |
// scrolling('stop') // this stops the automatic scrolling to occur |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment