Tell HN: Adblock rules to hide HN posts about Twitter & Musk

64 points by xvello ↗ HN
For those who want some relief from the Twitter/Musk drama, here are three cosmetic filters to add to your custom uBlockOrigin / AdGuard rules:

    news.ycombinator.com##tr.athing span.titleline > a:has-text(/\bTwitter\b/):upward(tr):remove()
    news.ycombinator.com##tr.athing span.titleline > a:has-text(/\bMusk\b/):upward(tr):remove()
    news.ycombinator.com##tr.spacer + tr:not(.athing):remove()
The first two ones remove the post title if it contains Twitter and/or Musk. The third one removes the second line and the spacer.

I also hide some machine learning topics with these rules:

    news.ycombinator.com##tr.athing span.titleline > a:has-text(/\bstable\Wdiffusion\b/i):upward(tr):remove()
    news.ycombinator.com##tr.athing span.titleline > a:has-text(/\bdall-e\b/i):upward(tr):remove()
I'll probably make that a configurable template for https://letsblock.it/ soon

17 comments

[ 3.1 ms ] story [ 55.0 ms ] thread
Now if we could do that universally.
Hear hear! I use Tiny Tiny RSS and make extensive use of its post filtering abilities. Post with Twitter or Musk in the title go to /dev/null
While you're in your settings, add these three rules for a quick & dirty dark mode:

    news.ycombinator.com##html:style(filter:invert(100%) hue-rotate(180deg))
    news.ycombinator.com##body:style(background: white)
    news.ycombinator.com##div.toptext:style(color: black)
If you use chromium based browsers, the built-in dark mode (hidden under 'chrome://flags/#enable-force-dark') is insanely good (pick "selective inversion of non-image elements") and doesn't tank performance.
Delete the app and stop buying the cars while you’re at it
This is great, thanks!
Oh, it might be worth adding duplicates for people who visit via hackernews.com

    hackernews.com##tr.athing span.titleline > a:has-text(/\bTwitter\b/):upward(tr):remove()
    hackernews.com##tr.athing span.titleline > a:has-text(/\bMusk\b/):upward(tr):remove()
    hackernews.com##tr.spacer + tr:not(.athing):remove()
Wouldn't that hide this post? :p
Isn’t that perfectly ok, since now you no longer need this post?
We also get complaints about those stories not being covered enough. The HN front page is suboptimal for nearly every individual user no matter what we do.

(This is not a criticism of the OP, nor a complaint - I just think it's interesting.)

I, for one, am glad it's not optimized for everyone. It's tough to find places with new exciting content that's adjacent to what I like, which HackerNews does exceedingly well.

I also enjoy the moderation style, which weeds out low-effort posts that plague other communities, so thanks a lot for all the hard work, Dang and team. Keep it up!

Edit: grammar

Switch to viewing HN on the libera IRC network in ##hntop! Then you can write IRC scripts to filter/process the posts in any way you want...