您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Prevent YouTube from using 0-9 shortcuts only while watching videos
// ==UserScript== // @name Block 0-9 keys on YouTube (video only) // @namespace http://tampermonkey.net/ // @version 1.1 // @description Prevent YouTube from using 0-9 shortcuts only while watching videos // @match https://www.youtube.com/* // @license MIT // ==/UserScript== (function() { document.addEventListener('keydown', function(e) { // Do not block if the user is typing in an input, textarea, or contentEditable element if (e.target.tagName.toLowerCase() === 'input' || e.target.tagName.toLowerCase() === 'textarea' || e.target.isContentEditable) { return; } // Block number keys 0-9 (top row and numpad) if ((e.key >= '0' && e.key <= '9') || (e.keyCode >= 96 && e.keyCode <= 105)) { e.stopImmediatePropagation(); e.preventDefault(); } }, true); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址