Userscript to hide YouTube comments and suggestions

Posted on June 22, 2026

Why

In an effort to limit my “social” media exposure and be much more deliberate about using it, I developed a userscript that hides YouTube comments and suggestions as I found their often pathetic efforts for attention unworthy of the same.

Installing the script

Chrome

Just download the script by clicking on the Download raw file button with the arrow on it. Open chrome://extensions and drag-and-drop the file into Chrome. Chrome should ask if you want to install it. You can also disable or remove it here.

Alternatively, you can also use a dedicated userscript manager from the Chrome web store. Read the paragraph on Firefox to learn how to install the script in such a manager.

Firefox and others

Firefox requires you to install a userscript manager add-on. One of the most famous ones is Greasemonkey. I’m using Tampermonkey because it is available across different browsers and also offers a nice configuration interface with a built-in editor.

After Tampermonkey is installed, click on the following link. Tampermonkey should display the script and ask if you want to install it: Click to install

Using the script

With the script enabled, comments and suggestions will be hidden by default.

You can make them visible by clicking the button Show and scrolling a little.

Userscript to hide YouTube comments

You can enable the script for comments and suggestions separately using the variables enableForSuggestions and enableForComments at the very top.

You can also easily modify the texts on the buttons. Change the values of the text variables in the buttonConfig dictionary accordingly. If you don’t know what that means: you’ll want to change "Hide" and "Show" in the buttonConfig line. Note the quotation marks and capital “H” and “S”.

Finally, you can adapt the style of the buttons using the buttonStyle variable.

Source code

The source is available on GitHub.