Live data from Hacker News

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

news.ycombinator.com

31–40 of 47 posts

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

#32

Super weird flex. Especially things like Verge which is right on topic for HN. We get regular business updates about tech firms from posts on Reuters, bloomberg etc also. So not only are you paranoid about ads but general news stories also?

I'd disagree somewhat there, they are examples of "sites that are not principally about technology and recur somewhat frequently", and it ends "(choose your own)".

The point is that these recur often and do not specifically have a technology focus, but are current events focused.

The list choices are not really the point either, just examples to highlight the uBO rules.

Also: "So not only are you paranoid about ads but general news stories also?" - I'm not sure what you mean to be honest.

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

#33
Userscript/Violentmonkey version

  // ==UserScript==
  // @name         Hide Specific HN Entries
  // @namespace    Violentmonkey Scripts
  // @version      0.1
  // @description  Hide HN entries from specific websites
  // @author       h_o_o_t, smnrg
  // @match        https://news.ycombinator.com/*
  // @grant        none
  // ==/UserScript==

  (function() {
      'use strict';

      const blockedSites = [
          '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',
          'bbycroft.net'
      ];

      const entries = document.querySelectorAll('table:not(.fatitem) tr > td.title');

      entries.forEach(entry => {
          const link = entry.querySelector('a');
          if (link && blockedSites.some(site => link.href.includes(site))) {
              const row = entry.parentElement;
              row.style.display = 'none';
              if (row.nextElementSibling) row.nextElementSibling.style.display = 'none';
              if (row.nextElementSibling && row.nextElementSibling.nextElementSibling) row.nextElementSibling.nextElementSibling.style.display = 'none';
          }
      });
  })();

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

#35
post #33

Userscript/Violentmonkey version // ==UserScript== // @name Hide Specific HN Entries // @namespace Violentmonkey Scripts // @version 0.1 // @description Hide HN entries from specific websites // @author h_o_o_t, smnrg // @match https://news.ycombinator.com/* // @grant none // ==/UserScript== (function() { 'use strict'; const blockedSites = [ 'businessinsider.com', 'dailymail.co.uk', 'foxnews.com', 'theverge.com', 'cn…

Awesome! :)

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

#36

Can i get one that filters out all the AI hype?

I gotchu, https://paste.sh/5XE7NvGM#Zb9Wx4P9Pi5XbIO01igypbk2

You'll need a userscript extension installed on your browser such as tampermonkey or greasemonkey.

This script is quite flexible, filter based on URL or on keyword in title. Add/remove filters as you please.

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

#37
post #33

Userscript/Violentmonkey version // ==UserScript== // @name Hide Specific HN Entries // @namespace Violentmonkey Scripts // @version 0.1 // @description Hide HN entries from specific websites // @author h_o_o_t, smnrg // @match https://news.ycombinator.com/* // @grant none // ==/UserScript== (function() { 'use strict'; const blockedSites = [ 'businessinsider.com', 'dailymail.co.uk', 'foxnews.com', 'theverge.com', 'cn…

I have a similar one that filters on keywords as well as URLs, https://paste.sh/5XE7NvGM#Zb9Wx4P9Pi5XbIO01igypbk2

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

#40

- "This rule isn't perfect as it only removes the title line and keeps the number of comments" Try a pattern like this, to match three 's in a row: :xpath(.. | ../following-sibling::tr[1] | ../following-sibling::tr[2]) (Or a cyclic permutation of it, depending on which you're anchoring to).

This is seamless, nice one!

For anyone else:

news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/{phrase1}|{phrase2}/):xpath(.. | ../following-sibling::tr[1] | ../following-sibling::tr[2])

Post reply on HN