News for hackers. Stuff that matters.
Re:Perl Turns 34 Today by FragenAntworten on Saturday December 18, 2021 @09:52AM (#29604865)
A particular user left many low-signal comments on this post, which was distracting, so I wrote a small userscript to remove the comments of arbitrary users. Sharing here in case anyone else finds it useful.

  // ==UserScript==
  // @name        Mute users
  // @namespace   Violentmonkey Scripts
  // @match       https://news.ycombinator.com/item
  // @grant       none
  // @version     1.0
  // @author      -
  // @description 12/18/2021, 9:43:19 AM
  // ==/UserScript==

  const mutedUsers = ['usernamehere']; // <== CHANGE THIS

  window.addEventListener('DOMContentLoaded', mute);

  function mute() {
    for (const mutedUser of mutedUsers) {
      const result = document.evaluate(`//*[@class="hnuser" and text()="${mutedUser}"]/ancestor::*[contains(@class, "comtr")]`, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE);
      for (let i = 0; i < result.snapshotLength; i++) {
        const el = result.snapshotItem(i);
        el.remove();
      }
    }
  }
Re:Perl Turns 34 Today by Tomte on Saturday December 18, 2021 @04:24PM (#29608659)
Users don't seem to flag those comments, even the two-words-in-uppercase comments. Most of those are still live, even ten hours later.

This isn't a "wait a bit and things will be fine" situation.

Flagging and voting has always been controversial on HN, but when it doesn't work at all even with those — I have no idea how it could work with slightly controversial political stuff.

Re:Perl Turns 34 Today by fdgdd on Sunday December 19, 2021 @07:17AM (#29613337)
And here's the uBlock Origin version:

  news.ycombinator.com##tr[class="athing comtr"]:has(a[href="user?id=usernamehere"])