3 ms·
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"
by mrweasel 1y ago
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"]
}
]
}