Disable YouTube Hotkeys with Modern Settings Page

Disable various YouTube hotkeys, including frame skip, with a modern settings page

< Feedback on Disable YouTube Hotkeys with Modern Settings Page

Review: قالتىس - قوليازما ئىشلەيدۇ

§
يوللانغان ۋاقتى: 2025-04-25

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;

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.