Skip to content

Instantly share code, notes, and snippets.

@paulera
Last active April 18, 2021 21:42
Show Gist options
  • Save paulera/112d79fa02d971f97e297ec6ca814fcf to your computer and use it in GitHub Desktop.
Save paulera/112d79fa02d971f97e297ec6ca814fcf to your computer and use it in GitHub Desktop.
Smart bookmarks that add auto-scrolling functionality to the browser

Create bookmarks as per below to automate scrolling

Name URL
slower javascript:if (typeof window.scrollLines === 'undefined') { window.scrollLines = 1; } if (typeof window.scrollInterval === 'undefined') { window.scrollInterval = 1; } ; if (window.scrollLines > 1) { window.scrollLines--; window.scrollInterval = 1; } else { window.scrollLines = 1; window.scrollInterval += 25; }; clearInterval(window.scrollHandler) ; window.scrollHandler = setInterval(function() { window.scrollBy(0, window.scrollLines); }, window.scrollInterval ); window.scrollLines; window.scrollInterval;
pause javascript:clearInterval(window.scrollHandler);
play javascript: if (typeof window.scrollLines === 'undefined') { window.scrollLines = 1; } ; if (typeof window.scrollInterval === 'undefined') { window.scrollInterval = 1; } ; clearInterval(window.scrollHandler) ; window.scrollHandler = setInterval(function() { window.scrollBy(0, window.scrollLines); }, window.scrollInterval );
faster javascript:if (typeof window.scrollLines === 'undefined') { window.scrollLines = 1; } ; if (typeof window.scrollInterval === 'undefined') { window.scrollInterval = 1; } ; if (window.scrollInterval > 1) { window.scrollInterval -= 100; window.Lines = 1; } else { window.scrollLines++; window.scrollInterval = 1; }; clearInterval(window.scrollHandler) ; window.scrollHandler = setInterval(function() { window.scrollBy(0, window.scrollLines); }, 1 );

TODO: use cookies so different speeds for different sites is remenbered.

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