Skip to content

Instantly share code, notes, and snippets.

@r14c
Last active July 29, 2023 17:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save r14c/407ef72634f91c3976dee97fac765c3c to your computer and use it in GitHub Desktop.
Save r14c/407ef72634f91c3976dee97fac765c3c to your computer and use it in GitHub Desktop.
Autoscroll Userscript
// ==UserScript==
// @name Autoscroll
// @namespace https://github.com/tokyo-jesus/
// @description Scrolls the page automatically
// @include http*://*
// @version 2.0.1
// @grant GM_registerMenuCommand
// ==/UserScript==
GM_registerMenuCommand("Autoscroll", function () {
var speed = Number(prompt("Select speed (10 fast, 2000 slow; -1 to cancel)", "100"));
var scroll = function () {
if (speed > -1) {
window.scrollBy(0 , 1);
setTimeout(scroll, speed);
}
};
setTimeout(scroll, speed);
});
@Samg381
Copy link

Samg381 commented Jul 29, 2023

Doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment