Created
July 5, 2013 21:08
-
-
Save agamm/5937255 to your computer and use it in GitHub Desktop.
Automatically scroll webpages (nice for reading online) Installation: Create a new bookmark, call it: "Autoscroll", and in the URL field enter the code below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: var x = 1 * prompt("Start From:", window.pageYOffset);var s = 1 * prompt("Speed:", 0.03);var time = document.createElement("div");time.style.position = "fixed";time.style.top = "90%";time.style.left = "90%";document.body.appendChild(time);if (x != null && s !== null) {window.setInterval(function () {if (x + window.innerHeight <= document.height) {x += s;document.body.scrollTop = x;time.innerHTML = ((document.height - (x + window.innerHeight)) / (s * 100)).toFixed(2) + "s";}}, 10);} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment