您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
disables the 0-9 keyboard shortcuts
当前为
- // ==UserScript==
- // @name Disable YouTube Number Keyboard Shortcuts
- // @namespace https://github.com/timmontague/youtube-disable-number-seek
- // @description disables the 0-9 keyboard shortcuts
- // @version 1.0
- // @match *://www.youtube.com/*
- // @match *://vid.puffyan.us/*
- // @match *://invidious.fdn.fr/*
- // @match *://invidious.048596.xyz/*
- // @match *://invidious.site/*
- // @match *://yewtu.be/*
- // @match *://invidiou.site/*
- // @match *://invidious.himiko.cloud/*
- // @match *://invidious.snopyta.org/*
- // @match *://invidious.namazso.eu/*
- // @match *://invidious.xyz/*
- // @match *://ytprivate.com/*
- // @match *://invidious.kavin.rocks/*
- // @match *://invidious.tinfoil-hat.net/*
- // @match *://tube.connect.cafe/*
- // @match *://invidious.tube/*
- // ==/UserScript==
- function keyboard_event_handler(e) {
- // Don't prevent entering numbers in input areas
- if (e.target.tagName == 'INPUT' ||
- e.target.tagName == 'SELECT' ||
- e.target.tagName == 'TEXTAREA' ||
- e.target.isContentEditable) {
- return;
- }
- // Trap number keys
- if (e.key >= '0' && e.key <= '9') {
- e.stopImmediatePropagation();
- }
- }
- window.addEventListener('keydown', keyboard_event_handler, true);