Greasy Fork is available in English.

YouTube - Remove Comments on Others' Videos

Dramatically reduce the stress that watching videos causes by getting rid of the comments down below.

От 18.10.2022. Виж последната версия.

// ==UserScript==
// @name         YouTube - Remove Comments on Others' Videos
// @namespace    https://greasyfork.org/en/users/761164
// @version      2.1.0
// @description  Dramatically reduce the stress that watching videos causes by getting rid of the comments down below.
// @homepage     https://greasyfork.org/en/users/761164
// @license      GPL-3.0
// @author       XerBlade
// @match        https://www.youtube.com/watch*
// @icon         https://www.google.com/s2/favicons?domain=youtube.com
// @require      https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@3439cbc6f49da5bfc4c3597a7906f1c5203a260d/waitForKeyElements.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    waitForKeyElements("#subscribe-button a", (subButton) => {
        // Check if is your own video first
        // If this is not one of your videos, there shouldn't be an Edit button, in theory
        /*if (!!document.querySelector('#subscribe-button a[href$="/edit"]')) {
            return;
        }*/
        console.log(subButton);
        if (subButton.href.endsWith("/edit")) {
            console.log("user");
            return;
        }
        console.log("not user");

        // Comments go bye bye
        waitForKeyElements("#comments", (comments) => {
            console.log("comments");
            comments.remove();
        });
        waitForKeyElements("#comment-teaser", (teaser) => {
            console.log("comment-teaser");
            teaser.remove();
        });
    });
})();