Live data from Hacker News

uBlock Origin rules for HN: removing MSM news sources reduces systemic stress

news.ycombinator.com

1–10 of 47 posts

uBlock Origin rules for HN: removing MSM news sources reduces systemic stress

#1
I recently added some uBlock Origin rules for HN that remove news sources focusing principally on `The` News rather than technical topics and the net result has been a much more pleasurable experience on par with HN from a few years ago.

I can read the `news` news in many places, and I do, but I like to come here for industry and niche technical topics.

Many I've spoken to share this sentiment and I hope this is of benefit to anyone wishing to focus more on what they are interested in.

You can block a source or keywords with the same rule:

news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/{phrase1}|{phrase2}/):nth-ancestor(1)

e.g. a brief sample of sites that are not principally about technology and recur somewhat frequently (choose your own):

  news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/businessinsider.com|dailymail.co.uk|foxnews.com|theverge.com|cnn.com|reuters.com|zerohedge.com|insider.com|bloomberg.com|euronews.com|theguardian.com|wsj.com|ft.com|theconversation.com|thetimes.co.uk|bbc.co.uk|nytimes.com|newyorker.com|theatlantic.com/):nth-ancestor(1)
or simply a phrase:

news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/web3|crypto/):nth-ancestor(1)

This rule isn't perfect as it only removes the title line and keeps the number of comments, but it is definitely good enough and I am enjoying reading HN a great deal more.

You can add these to your Android phone too with Firefox and uBO.

Re: uBlock Origin rules for HN: removing MSM news sources reduces systemic stress

#4
This makes HN more like lobste.rs, except perhaps for VC news which are banned on lobste.rs, and sound like they’re not removed by this filter.

I prefer to have a dose of “news” news, and I got that through HN. But I won’t object, it’s probably better.

Re: uBlock Origin rules for HN: removing MSM news sources reduces systemic stress

#6
Along the same lines, the below filters will do flawed but decent-ish job of hiding comments from specific commentators if you have to regularly resist the urge to get into arguments with people.

  news.ycombinator.com##tr.athing.comtr:has-text(/(example_user_one)|(example_user_two)/)
  news.ycombinator.com##tr.athing.comtr:has-text(/(example_user_one)|(example_user_two)/) + tr.athing.comtr:not(:has(.ind img[width="0"]))
They're imperfect because of how HN generates its HTML, so it will occasionally clobber replies that are alongside hidden comments as well or won't perfectly remove the entire thread. That tends to be somewhat rare I think, but worth being aware of.

I've complained about HN's HTML in the past, but it really is quite badly set up for parsing or styling; using a full-on table column for indentation is a kind of wild hack that makes it difficult to parse replies. But the filter still mostly works, because replies in these situations usually end up being back-and-forth with the same person. So tackling a comment and its immediate reply often ends up correctly hiding the entire thread.

----

> This rule isn't perfect as it only removes the title line and keeps the number of comments

Happily this can be fixed, just use an adjacent sibling selector(https://developer.mozilla.org/en-US/docs/Web/CSS/Next-siblin...) and duplicate your initial filter:

  news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/web3|crypto/):nth-ancestor(1)
  news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/web3|crypto/):nth-ancestor(1) + tr
It's probably overkill, but you can also add a 3rd instance to get rid of the spacing gap.

  news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/web3|crypto/):nth-ancestor(1) + tr + tr.spacer
----

I'm a fan of these kind of low-change filters for sites, I think it's something Ublock Origin can be really helpful for since a lot of people already have it installed and trust it.

But especially given HN's DOM makes this harder to do, I would also suggest that if you're looking at doing much more extensive modifications you're probably going to end up building a webextension or piping the site into another application using RSS or something.

But uBO filters are a pretty great accessible middle-ground.

Re: uBlock Origin rules for HN: removing MSM news sources reduces systemic stress

#7
post #5

Why does this post not wrap properly on mobile? Anyone else?. Seems like others are working fine

Sorry about that, it's desktop too and I have no idea why. I tried to force line breaks but to no avail.

If anyone knows how to fix I'd be grateful to know.

Re: uBlock Origin rules for HN: removing MSM news sources reduces systemic stress

#10
The problem is that HN will typically be the only place that will debunk these news stories and distill them into facts as opposed to sensationalism.

I am also surprised you put the Verge in there but not Ars. The latter having fallen down the cliff in recent years and not doing a lot of original reporting despite their budget.

Post reply on HN