Skip to content

ethanplusai/spamtracer

Repository files navigation

SpamTrace

Know exactly who sold your email.

SpamTrace is a privacy-first browser extension that automatically tags your email address when you sign up for websites. When spam arrives, the tag reveals exactly which company shared or sold your data.

SpamTrace Demo License No Backend

How It Works

  1. You sign up for a website — SpamTrace automatically fills in a tagged version of your email
  2. Example: On facebook.com, you@gmail.com becomes you+facebook@gmail.com
  3. Spam arrives — The "To" address shows which site leaked your email
  4. Busted: An email to you+facebook@gmail.com from sketchy-spam@xyz.biz means Facebook shared your data

Features

  • 🔒 100% Local — No servers, no accounts, no data collection
  • Automatic — Detects email fields and fills them instantly
  • 🎯 Smart Detection — Works with React, Vue, and dynamic forms
  • 📧 Universal — Works with Gmail, Outlook, Fastmail, and most email providers
  • 📋 History Log — Track which sites you've signed up to
  • 🪶 Lightweight — Zero bloat, no performance impact

Installation

Chrome

  1. Download or clone this repository
  2. Go to chrome://extensions/
  3. Enable "Developer mode" (top right)
  4. Click "Load unpacked"
  5. Select the spamtracer folder

Firefox

  1. Download or clone this repository
  2. Copy manifest-firefox.json to manifest.json (or run the swap command below)
  3. Go to about:debugging#/runtime/this-firefox
  4. Click "Load Temporary Add-on..."
  5. Select manifest.json from the spamtracer folder

Quick manifest swap for Firefox:

cp manifest-firefox.json manifest.json

Swap back for Chrome:

cp manifest-chrome.json manifest.json

Usage

  1. Click the SpamTrace icon in your browser toolbar
  2. Enter your base email address (e.g., you@gmail.com)
  3. Make sure the toggle is enabled
  4. Browse normally — SpamTrace handles the rest

When you encounter a signup form, SpamTrace will automatically fill in a tagged email like you+sitename@gmail.com.

Project Structure

spamtracer/
├── manifest.json           # Active manifest (swap for browser)
├── manifest-chrome.json    # Chrome-specific manifest (MV3 service_worker)
├── manifest-firefox.json   # Firefox-specific manifest (MV3 scripts)
├── background.js           # Service worker / background script
├── content.js              # Email field detection and autofill
├── popup.html              # Extension popup UI
├── popup.js                # Popup logic
├── popup.css               # Popup styles
├── package.sh              # Build script for store submissions
└── icons/
    ├── icon16.png
    ├── icon32.png
    ├── icon48.png
    └── icon128.png

How the Tagging Works

Website Your Email Tagged Email
facebook.com you@gmail.com you+facebook@gmail.com
app.shopify.com you@gmail.com you+app-shopify@gmail.com
news.ycombinator.com you@gmail.com you+news-ycombinator@gmail.com

The domain tag is generated by:

  1. Taking the hostname (e.g., www.example.com)
  2. Stripping www.
  3. Removing the TLD (.com, .co.uk, etc.)
  4. Joining remaining parts with hyphens
  5. Limiting to 30 characters

Privacy

SpamTrace is designed with privacy as the core principle:

  • No data collection — We don't collect any information
  • No network requests — The extension never contacts any server
  • No analytics — No tracking, no telemetry, no crash reports
  • No accounts — Nothing to sign up for
  • Local storage only — Your email and history stay on your device
  • Minimal permissions — Only requests what's absolutely necessary

See our full Privacy Policy for details.

Permissions Explained

Permission Why It's Needed
storage Save your base email and history locally
activeTab Interact with the current page to detect forms
scripting Run the content script that finds email fields

Building for Store Submission

Run the package script to create distribution zips:

chmod +x package.sh
./package.sh

This creates:

Technical Details

Email Field Detection

SpamTrace detects email inputs by checking for:

  • <input type="email">
  • <input> with name or id containing "email" (case-insensitive)

Autofill Rules

The extension only autofills when:

  • The field is empty, OR
  • The field contains exactly your base email

It will never overwrite if:

  • You've typed something else
  • The field already has a +tag
  • The field was already processed

Dynamic Form Support

A MutationObserver watches for dynamically added elements, ensuring SpamTrace works on:

  • Single-page applications (React, Vue, Angular)
  • Lazy-loaded forms
  • Modal popups
  • Infinite scroll pages

Browser Compatibility

Browser Manifest Version Background Type Status
Chrome V3 service_worker ✅ Supported
Firefox V3 scripts ✅ Supported
Edge V3 service_worker ✅ Should work (uses Chrome manifest)

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

MIT License — see LICENSE for details.

Links

About

Open source browser extension for making your email unique as you sign up for things around the web so you can track spam.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors