Skip to main content
100%

Firefox PDF.js reader autoscroll shorcuts

✓ Published0🌍 Public
UUtopiah
Last edited Aug 16, 2021
Created on Mar 2, 2019

A short JavaScript snippet adds an autoscroll feature to Firefox’s PDF.js reader. Pressing the “s” key toggles a `setInterval` that calls `scrollBy(0, 1)` on the `#viewerContainer` element every 100 milliseconds, slowly advancing the document. The code uses plain DOM APIs and a keyup event listener, with no external libraries. The animation shows continuous page movement while the shortcut is active.

AI-generated description

Similar vizzes