Skip to content

Instantly share code, notes, and snippets.

@akaydev-coder
Forked from r14c/README.md
Created December 31, 2022 10:33
Show Gist options
  • Save akaydev-coder/99277fe655c0bc6ec6f6259a1dbf9602 to your computer and use it in GitHub Desktop.
Save akaydev-coder/99277fe655c0bc6ec6f6259a1dbf9602 to your computer and use it in GitHub Desktop.
Autoscroll Userscript
// ==UserScript==
// @name Autoscroll
// @namespace https://gist.github.com/
// @description Scrolls the page automatically
// @include http*://*
// @version 1.0
// ==/UserScript==
var interval;
GM_registerMenuCommand("Start Autoscroll", function () {
var speed = prompt("Select speed (10 fast, 2000 slow)", "100");
interval = setInterval(function () {
window.scrollBy(0, 1);
}, speed);
});
GM_registerMenuCommand("Stop Autoscroll", function () {
try {
clearInterval(interval);
} catch () {}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment