October 26, 2014

JavaScript: Automatically scroll to the end of an infinitely-scrolling page

Simply paste this code into your browser console:
var scrollInterval = setInterval(function(){window.scrollTo(0,-999999999999)},500)
When it's done, clear out the auto-scroll by pasting this code into your console:
And if, for some reason, the page wants to log you out (in my case I was trying to load all of my "Friends" on Facebook so I could mass-unfriend people), paste the following code into the console to prevent the page from reloading:
window.addEventListener('beforeunload',function(e){e.returnValue = 'sure?';return 'sure?'});

No comments:

Post a Comment