Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I mean I wrote a small Firefox plugin that just removes the AI posts... I only saw this one because I was debugging as I tried to remove Apple Intelligence posts.


Is your plugin public? Some friends and I were lamenting the AI-ification of HN, so is use anything that filtered it down in a heartbeat.


No, but here's the tiny bit of code I just use. Improve as you please.

bad-ai.js

const bad_words = [ " ai", "ai ", "a.i.", "openai", "llm", "agentic", "claude", "large language models", "apple intelligence" ]

var elements = document.body.getElementsByClassName("titleline");

for (var i = 0; i < elements.length; i++){ var element = elements[i]; var text = element.children[0].text.toLowerCase();

    bad_words.forEach(word => { 
        if( text.indexOf(word) > -1 ){
            console.log("Bad-AI remove: " + text)
            element.parentElement.parentElement.nextSibling.style.display = "none";
            element.parentElement.parentElement.style.display = "none";
        }
    });
}

manifest.json

{ "manifest_version": 2, "name": "No-Hacker-AI", "version": "1.0",

  "description": "Hide stories on HackerNews, if they mention AI technologies.",

  "icons": {
    "96": "icons/bad-ai.png"
  },

  "content_scripts": [
    {
      "matches": ["*://news.ycombinator.com/*"],
      "js": ["bad-ai.js"]
    }
  ]
}




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: