Created
February 22, 2026 20:50
-
-
Save hrldcpr/ea40a9795d5ad956d9b23807d42aecf6 to your computer and use it in GitHub Desktop.
user script to hide AI stories on Hacker News frontpage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Hacker News Sans AI | |
| // @match *://news.ycombinator.com/ | |
| // @grant none | |
| // @version 1.0 | |
| // @author Harold Cooper | |
| // @description 2/22/2026, 2:02:26 PM | |
| // ==/UserScript== | |
| (() => { | |
| const FILTERS = [ | |
| // companies: | |
| /anthropic/i, | |
| /openai/i, | |
| // models: | |
| /claude/i, | |
| /gemini/i, | |
| /gpt/i, | |
| /grok/i, | |
| /llama/i, | |
| // lingo: | |
| /\bai\b/i, | |
| /agent/i, | |
| /claw/i, | |
| /llm/i, | |
| ]; | |
| Array.from(document.getElementsByClassName("submission")) | |
| .filter((e) => FILTERS.some((f) => f.test(e.textContent))) | |
| .forEach((e1) => { | |
| const e2 = e1.nextElementSibling; | |
| [e1, e2].forEach((e) => { | |
| // e.style.visibility = "hidden"; | |
| e.style.opacity = 0; | |
| e.addEventListener("mouseenter", () => { | |
| e1.style.opacity = 1; | |
| e2.style.opacity = 1; | |
| }); | |
| e.addEventListener("mouseleave", () => { | |
| e1.style.opacity = 0; | |
| e2.style.opacity = 0; | |
| }); | |
| }); | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment