YouTube Shorts Overlay Hider

Removes the overlay from YouTube shorts.

// ==UserScript==
// @name         YouTube Shorts Overlay Hider
// @namespace    https://greasyfork.org/users/696211-ctl2
// @license      MIT
// @version      1.1
// @description  Removes the overlay from YouTube shorts.
// @author       Callum Latham
// @match        *://www.youtube.com/*
// @match        *://youtube.com/*
// @exclude      *://www.youtube.com/embed/*
// @exclude      *://youtube.com/embed/*
// @grant        none
// ==/UserScript==

(() => {
        const styleElement = document.createElement("style");
        document.head.appendChild(styleElement);
        const styleSheet = styleElement.sheet;

        const rules = [
            ['.ytd-shorts #overlay.ytd-reel-player-overlay-renderer', [
                ['visibility', 'hidden'],
            ]],
        ];

        for (const rule of rules) {
            styleSheet.insertRule(`${rule[0]}{${rule[1].map(([property, value]) => `${property}:${value};`).join('')}}`);
        }
})();