# Block comments on the web

Comments on the web can be toxic, and a waste of time. Here's how to block them ...

## In Firefox/Chrome, and Android #

I assume you already use uBlock Origin, and if not, then throw away whatever alternative you have, and switch to it.

On Android, uBlock Origin is supported by Firefox. If Firefox isn’t an option, there are others. At the moment of writing Vivaldi has backed-in content blocking, and supports custom filtering rules, but you might have to publish these rules, in a text file, somewhere online. Adguard might also support custom content filtering rules, although I have issues with trusting them MITM my traffic.

In uBlock Origin, add these to “My Filters” in its dashboard:

news.ycombinator.com##table.comment-tree
reddit.com##div.commentarea

||disqus.com/embed.js
##.disqus-container


Here’s how it should look like:

• Hacker News
• Reddit
• Disqus (on all websites)

Optionally, for extra sanity and street cred, also add these rules 😎

||twitter.com


A short primer on the syntax …

• Prefix CSS selectors with ##; so ##.dsq-brlink will block HTML elements with a .dsq-brlink class, and ###disqus_thread will block HTML elements with a #disqus_thread ID
• These CSS selectors can be “generic”, meaning they apply to all websites (in the case of Disqus), or they can apply to a specific domain: e.g. ###disqus_thread is a cosmetic filter that applies to all websites, whereas youtube.com###comments filters HTML elements with a #comments ID that are shown on youtube.com
• See relevant cheat sheet section
• You can block specific resources from loading; a || prefix means that a domain name follows, until a separator such as /
• A rule such as ||disqus.com/embed.js will block /embed.js on all subdomains of disqus.com
• See relevant cheat sheet section

For more details on these rules, see this cheat sheet:

### Publish it #

You can publish this list, as a text file, somewhere, anywhere, and reuse it wherever you have uBlock Origin installed. For example, I published mine at: