Skip to content

Instantly share code, notes, and snippets.

@iosonosempreio
Created November 2, 2019 18:47
Show Gist options
  • Save iosonosempreio/1238f9d52e5d64c41d21f2b3cfd179ed to your computer and use it in GitHub Desktop.
Save iosonosempreio/1238f9d52e5d64c41d21f2b3cfd179ed to your computer and use it in GitHub Desktop.
// 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