Skip to content

Instantly share code, notes, and snippets.

@khajavi
Created March 6, 2015 08:56
Show Gist options
  • Save khajavi/4a6fe4186eac5b21b0cc to your computer and use it in GitHub Desktop.
Save khajavi/4a6fe4186eac5b21b0cc to your computer and use it in GitHub Desktop.
page.evaluate(function() {
var current = 0, delta = 800, total = document.height - delta;
window.scrollTo(0, current);
function fakeScroll() {
if(current < total) {
current = current + delta;
window.scrollTo(0, current);
window.setTimeout(fakeScroll, 100);
}
else {
//window.scrollTo(0, 0);
}
}
fakeScroll()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment