Last active
July 1, 2025 08:51
-
-
Save anna-oake/01ecfcc83732dfd9dda360e59d1999d4 to your computer and use it in GitHub Desktop.
Sudokumood Hotkeys
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 Sudokumood Hotkeys | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Add hotkeys to sudokumood.com | |
| // @author Anna Oake | |
| // @match *://*.sudokumood.com/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| "use strict"; | |
| const hotkeys = { | |
| 0: "#timer", // just something to remove focus from the board | |
| "-": "#pauseButton", | |
| "=": "#undo", | |
| }; | |
| const elements = Object.fromEntries( | |
| Object.entries(hotkeys).map(([k, v]) => [k, document.querySelector(v)]), | |
| ); | |
| window.addEventListener( | |
| "keydown", | |
| (e) => { | |
| elements[e.key]?.click(); | |
| }, | |
| true, | |
| ); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment