Created
November 19, 2016 08:52
-
-
Save RinorDreshaj/9721639dc583fbbe0e16169b5be8c4e1 to your computer and use it in GitHub Desktop.
Autoscrolling script
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
// Download Styler Extension for chrom | |
// When 1 is pressed the page starts automatically scrolling | |
// usage: 9gag, reading news | |
function pageScroll() { | |
window.scrollBy(0, 1); | |
scrolldelay = setTimeout(pageScroll,100); | |
} | |
document.addEventListener('keyup', (event) => { | |
const keyName = event.keyCode; | |
if (keyName === 49) { | |
pageScroll() | |
} | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment