Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@davidrenne
Created December 21, 2018 10:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save davidrenne/af714f8b683a478931edfd8381adb598 to your computer and use it in GitHub Desktop.
Save davidrenne/af714f8b683a478931edfd8381adb598 to your computer and use it in GitHub Desktop.
Paste into console to scroll forever and be able to stop it later. Perfect for screen scraping and just printing a pdf of most sites who forever load.
var scrollInt = 0;
function ScrollForever() {
scrollInt = window.setInterval(function() {window.scrollTo(0,document.body.scrollHeight);}, 1000);
}
function StopScrolling() {
window.clearInterval(scrollInt);
}
ScrollForever();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment