Escape Hatch – Chrome Extension Spec
Goal: Create a Chrome Extension (not a standalone web app, not a notes app). The extension runs only on *.gov domains and performs automatic find-and-replace of specific partisan text that may violate the Hatch Act.
Key Features:
Content script injects into *.gov pages.
Scans text nodes for matches against a replacement dictionary.
Replaces partisan phrases with neutral or comedic alternatives.
Ships with a default dictionary (in phrases.js), which is easy to extend.
Options page where users can:
Enable/disable replacements.
Add/edit their own custom replacements.
No data collection.
Constraints:
Must not break site functionality (no altering forms, buttons, or scripts).
Transparent and auditable (simple, well-documented code).
Defaults are provided, but user control is primary.
Architecture:
manifest.json – Chrome extension manifest (MV3).
content.js – Injected content script for text replacement.
phrases.js – Default replacement dictionary.
options.html / options.js – UI for user customization.
background.js (if needed) – Simple storage management.
Example Default Replacements:
USDA: "Due to the Radical Left Democrat shutdown..." → "Due to the government shutdown..."
FDA: "Democrat-led government shutdown" → "government shutdown"