Disable YouTube Hotkeys with Modern Settings Page

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

< 脚本 Disable YouTube Hotkeys with Modern Settings Page 的反馈

评价:好评 - 脚本运行良好

§
发布于: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;

发布留言

登录(不可用)以发布留言。

长期地址
遇到问题?请前往 GitHub 提 Issues。