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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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