News for hackers. Stuff that matters.
Re:Ask HN: How do I hide a user's comments? by thomassmith65 on Sunday July 03, 2022 @08:46AM (#31967293)
I use this in ViolentMonkey

  for (let idiot of ['alice','bob','carol','dick','eve']){
      for ( let a of document.querySelectorAll('a[href="user?id=' + idiot + '"]') ){
          let node = a.parentNode.parentNode.parentNode.parentNode
          if (node.tagName !== 'TABLE') { node.style.display = 'none' }
      } 
  }
Re:Ask HN: How do I hide a user's comments? by ogeiczvm on Sunday July 03, 2022 @09:07AM (#31967423)
thank you - I already had GreaseMonkey installed (for old.reddit.com redirection) - wasn't sure if they're compatible but they are - it worked nicely without any modifications - thank you very much. depending on the size of the list this may be cleaner than the ublock origin one - thanks again.
Re:Ask HN: How do I hide a user's comments? by thomassmith65 on Sunday July 03, 2022 @09:16AM (#31967481)
No problem. I can't remember any longer why I excluded 'TABLE' nodes; I think it's to leave the front page alone when it contains posts from the unwanted users. I was only concerned with hiding comments, not links.