您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable clicks on the ytp-chapter-container but keep text clickable, restore to original design and make clicking the player bar does nothing instead of scrolling down annoyingly
- // ==UserScript==
- // @name YouTube No Scroll Down clicking blank space (Chapter Text Clickable Only)
- // @namespace http://tampermonkey.net/
- // @version 1.4.1
- // @description Disable clicks on the ytp-chapter-container but keep text clickable, restore to original design and make clicking the player bar does nothing instead of scrolling down annoyingly
- // @author Ed
- // @license BSD-3-Clause
- // @match *://*.youtube.com/*
- // @grant GM_addStyle
- // ==/UserScript==
- (function() {
- 'use strict';
- // Inject custom CSS
- GM_addStyle(`
- :not(.ytp-exp-bottom-control-flexbox) .ytp-chapter-container {
- pointer-events: none !important; /* Disable clicks on the container */
- }
- :not(.ytp-exp-bottom-control-flexbox) .ytp-chapter-container .ytp-button,
- :not(.ytp-exp-bottom-control-flexbox) .ytp-chapter-container .ytp-chapter-title-content {
- pointer-events: auto !important; /* Enable clicks on buttons and text content */
- }
- `);
- })();