Disable various YouTube hotkeys, including frame skip, with a modern settings page
< Feedback op Disable YouTube Hotkeys with Modern Settings Page
How about checking whether the selected element is a text input? The original code prohibits typing a blocked key in a search and comment.
// Function to handle keydown events and disable selected hotkeys window.addEventListener('keydown', function(e) { const targetElement = e.target; const isTextInput = targetElement.type === "text" || targetElement.type === "textarea" || targetElement.type === "input" || targetElement.id === "contenteditable-root"; if (isTextInput) return;
Log in om antwoord te geven.
How about checking whether the selected element is a text input? The original code prohibits typing a blocked key in a search and comment.