Created
October 14, 2025 22:52
-
-
Save treyharris/cfa3df6edd23a7fae1c8e19327017494 to your computer and use it in GitHub Desktop.
Disable YouTube Number Keys userscript
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 Disable YouTube Number Keys | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Disable number key shortcuts on YouTube | |
// @author Trey Harris | |
// @match https://www.youtube.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.addEventListener('keydown', function(e) { | |
if (!isNaN(e.key) && e.key !== ' ') { | |
e.stopImmediatePropagation(); | |
} | |
}, true); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment