Skip to content

Instantly share code, notes, and snippets.

@emonkak
Created September 22, 2020 12:44
Show Gist options
  • Save emonkak/7484411d9e59355bc7e6731f83c68933 to your computer and use it in GitHub Desktop.
Save emonkak/7484411d9e59355bc7e6731f83c68933 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Remove YouTube Number Hotkeys
// @match https://www.youtube.com/watch
// @run-at document-end
// ==/UserScript==
document.addEventListener('keydown', (event) => {
if (event.target.id === 'movie_player' &&
["1", "2", "3", "4", "5", "6", "7", "8", "9"].includes(event.key)) {
event.stopPropagation();
}
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment