Settings

Theme

Show HN: Orange Cheeto Browser extension that replaces Trump with nicknames

cheetodon.com

4 points by philco a month ago · 0 comments · 1 min read

Reader

I built a browser extension that does text replacement across all websites -- specifically replacing "Trump" with rotating humorous nicknames.

The interesting technical bits:

- TreeWalker for DOM traversal (skips scripts, inputs, contenteditable, iframes)

- MutationObserver with debouncing for SPAs and dynamically loaded content

- Fisher-Yates shuffle bag for even nickname distribution (no repeats until all are used)

- Case preservation via regex (TRUMP -> MANGO MUSSOLINI, Trump -> Mango Mussolini)

- CSS-only animations with prefers-reduced-motion support

- Zero dependencies, plain JS, Manifest V3

The architecture is generic enough to fork for any text replacement use case. All the replacement logic lives in a single file.

No external requests, no analytics, no data leaves the browser. Settings sync via Chrome Storage / browser.storage.

Available for Chrome, Firefox, and Safari. Free.

Feedback on the implementation welcome -- the code is straightforward and I'd rather someone tell me my MutationObserver setup is wrong than find out the hard way.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection