Greasy Fork is available in English.

Remove YouTube Playables

A simple script to remove the YouTube Playables section from the homepage.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

// ==UserScript==
// @name         Remove YouTube Playables
// @namespace    http://tampermonkey.net/
// @version      v0.0.1
// @description  A simple script to remove the YouTube Playables section from the homepage.
// @author       Static Codes
// @match        https://www.youtube.com/
// @match        https://www.youtube.com/?app=desktop
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @license      MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Source - https://stackoverflow.com/a/29754070
    // Posted by Etienne Tonnelier, modified by community. See post 'Timeline' for change history
    // Retrieved 2026-07-11, License - CC BY-SA 4.0

    function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) {
        var startTimeInMs = Date.now();
        (function loopSearch() {
            if (document.querySelector(selector) != null) {
                callback();
                return;
            }
            else {
                setTimeout(function () {
                    if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs) { throw new Error("Youtube playable banner not loaded."); }
                    loopSearch();
                }, checkFrequencyInMs);
            }
        })();
    }

    var checkFrequencyInMs = 1000;
    var timeoutInMs = 10000;

    waitForElementToDisplay("ytd-rich-section-renderer",function(){
        var elements = document.getElementsByTagName("ytd-rich-section-renderer");

        var elementToRemove = null;

        for (var i=0; i < elements.length; i++) {
            if (elements[i].outerText.startsWith("YouTube Playables")) { elementToRemove = elements[i]; }
        }

        if (elementToRemove === null) { throw new Error("Youtube playable banner not found."); }

        try {
            elementToRemove.remove();
            console.log("[Youtube Playables Removed]: true");
        }
        catch (e) {
            console.log("[Youtube Playables Removed]: false");
            console.error(e);
        }
    },checkFrequencyInMs,timeoutInMs);
})();