June 15th 2026 - Things I Worked On
Added toggling pencil in sudoku.com
Sometimes I like to do sudoku puzzles on sudoku.com but I don't like toggling the pencil with my mouse. I created a small chrome extension to simulate a mousedown event on the pencil element when I press the "n" key. "n" stands for notes.
if (event.key.toLowerCase() === 'n') { const pencilButton = document.querySelector('.game-controls-item[data-action="pencil"]'); if (pencilButton) { pencilButton.dispatchEvent(new MouseEvent('mousedown', { bubbles: true })); } }