Created
January 13, 2026 00:58
-
-
Save natyusha/b51a8fb73cca841b55d454d2b49b2e04 to your computer and use it in GitHub Desktop.
Use the mouse wheel to navigate between plan pages (down = next, up = previous)
This file contains hidden or 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
| // ==UserScript== | |
| // @name RaidPlan.io - Mouse Wheel Navigation | |
| // @namespace https://gist.github.com/natyusha | |
| // @version 1.0.0 | |
| // @description Use the mouse wheel to navigate between plan pages (down = next, up = previous) | |
| // @match https://raidplan.io/plan/* | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| window.addEventListener('wheel', function(e) { | |
| const isNext = e.deltaY > 0; | |
| const key = isNext ? 'ArrowRight' : 'ArrowLeft'; | |
| // Create keyboard event that mimics pressing left/right arrow | |
| const event = new KeyboardEvent('keydown', { | |
| key: key, | |
| code: key, | |
| keyCode: isNext ? 39 : 37, | |
| which: isNext ? 39 : 37, | |
| bubbles: true, | |
| cancelable: true | |
| }); | |
| // Dispatch on document | |
| document.dispatchEvent(event); | |
| // Optional: prevent the wheel from scrolling the whole page | |
| // (uncomment only if the page itself scrolls annoyingly when using the wheel) | |
| // e.preventDefault(); | |
| }, { passive: false }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment