YouTube No Scroll Down clicking blank space (Chapter Text Clickable Only)

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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 */
        }
    `);
})();