Some web pages loads dynamically when you scroll to the bottom. The new content is only loaded when visible on the screen. Sometimes, you need to reach the bottom of the page, but have to wait until each section is loaded.
To solve this problem, this page explains how to do to it automatically, without waiting while spamming the mouse wheel.
First, go on the page you want to scroll and open the console:
Inspect
F12
CTRL
+SHIFT
+I
When the console is opened, copy paste the following code (automatic scrolling) and press enter:
(function() {
var intervalObj = null;
var retry = 0;
var clickHandler = function() {
console.log("Clicked; stopping autoscroll");
clearInterval(intervalObj);
document.body.removeEventListener("click", clickHandler);
}
function scrollDown() {
var scrollHeight = document.body.scrollHeight,
scrollTop = document.body.scrollTop,
innerHeight = window.innerHeight,
difference = (scrollHeight - scrollTop) - innerHeight
if (difference > 0) {
window.scrollBy(0, difference);
if (retry > 0) {
retry = 0;
}
console.log("scrolling down more");
} else {
if (retry >= 3) {
console.log("reached bottom of page; stopping");
clearInterval(intervalObj);
document.body.removeEventListener("click", clickHandler);
} else {
console.log("[apparenty] hit bottom of page; retrying: " + (retry + 1));
retry++;
}
}
}
document.body.addEventListener("click", clickHandler);
intervalObj = setInterval(scrollDown, 1000);
})()
The page should start scolling. Note that if the tab loses focus, scrolling may stop.
Take a coffee ...
Finally stop the scrolling process by clicking anywhere in the page.