4 ms·
Off topic, but does anyone know a browser extension that lets you block certain domains from the HN list? I've blocked twitter/x from my DNS, and don't want lin
by 2024throwaway 3y ago
Off topic, but does anyone know a browser extension that lets you block certain domains from the HN list? I've blocked twitter/x from my DNS, and don't want links to it cluttering the feed.
- nick_g 3y agoI'm not aware of one, but if you can insert custom css rules it should be simple with something like tbody tr.athing:has(.title .titleline a[href*="twitter.com"]), tbody tr.athing:has(.title .titleline a[href*="twitter.com"]) + tr, tbody tr.athing:has(.title .titleline a[href\*="twitter.com"]) + tr + tr { display: none; } This selects for any `tr` which has an anchor to a url with twitter.com somewhere in it (with some layers in between) and the two `tr` which follow. Note that this is pretty naive and could have some false positives with links such as https://example.com/blog/a-post-about-twitter.com https://example.com/blog/a-post-about-twitter.com and such, you could be more careful with the attribute selector if you'd like This will leave "holes" in the numbering of the list of items as the numbers are not calculated based on the structure of the document but are rather hardcoded. You could definitely fix this with some more funky css rules if needed.
- 2024throwaway 3y agoPerfect thank you.
- sixstringtheory 3y agoI would think you could automatically load the first match's "hide" URL until no more matches appear in the page, but it might trip some kind of rate limiter.
- timeon 3y agoPay/login-walled sites are common here.
- deleted 3y ago[deleted]
- 2024throwaway 3y agoThat is... not why I blocked it.