A browser extension that intercepts ChatGPT requests to detect and anonymize email addresses before they leave your browser.
- Real-time Interception: Monitors outgoing messages to ChatGPT using
fetchwrapping. - Email Detection: regex-based scanning of message payloads.
- Automatic Anonymization: Replaces email addresses with
[EMAIL_ADDRESS]in the request payload. - User Alerts: Displays a when issues are detected.
- History: Tracks detected issues in browser storage.
- Dismissal: Allows "muting" specific emails for 24 hours.
- Node.js 18+
- NPM or PNPM
-
Install Dependencies
npm install
-
Dev Mode (Hot Reload)
npm run dev
For firefox:
npm run dev:firefox
-
Build for Production
npm run build
For firefox:
npm run build:firefox
This will generate a
.output/directory containing the extension for Chrome/Edge/Firefox.
- Open
chrome://extensions/. - Enable Developer mode (top right).
- Click Load unpacked.
- Select the
.output/chrome-mv3folder.
- Open
about:debugging#/runtime/this-firefox. - Click Load Temporary Add-on.
- Select the
manifest.jsonin.output/firefox-mv2(or mv3).
This extension uses the WXT framework with React.
-
Fetch Interception (
public/injected.js):- A script injected into the page context to override
window.fetch. - Intercepts POST requests to
/conversation. - Extracts user messages and communicates with the Content Script via
window.postMessage.
- A script injected into the page context to override
-
Content Script (
entrypoints/content.tsx):- Runs in the ISOLATED world.
- Acts as a bridge between the Injected Script and the Background Service Worker.
- Mounts the React UI (Shadow DOM) to the page when issues are found.
-
Service Worker (
entrypoints/background.ts):- Handles the heavy lifting: scanning text and managing storage logic.
- Ensures logic is centralized and keeps the Content Script lightweight.
-
Storage (
lib/storage.ts):- Uses
browser.storage.localto persist history and dismissal states across sessions and tabs.
- Uses
-
UI (
components/EmailIssueModal.tsx):- A React component styled with Tailwind CSS.
- Provides "Issues Found" and "History" tabs.
- UI generated with V0
- Chrome/Edge: Fully supported (Manifest V3).
- Firefox: Supported. WXT handles the polyfills.
- Safari: Not explicitly tested, but should work with
wxt build -b safariif converter is set up.