Skip to content

leotrax3d/WordSwap

Repository files navigation

WordSwap

A Chrome Extension that replaces words and images on any website — with presets, custom rules, and random variants.

Manifest Version Version License PRs Welcome No tracking

We are fighting against tech giants

What is WordSwap?

WordSwap is a lightweight Chrome Extension that lets you silently rewrite the web. Replace any word, phrase, or image on any website with whatever you want — instantly, locally, and with zero tracking.

  • MicroslopMicroslop (or Microsucks, or M$oft — chosen at random)
  • Replace images by URL pattern, alt text, domain, or CSS class
  • Works on dynamically loaded content (SPAs, infinite scroll, lazy images)
  • Dark and light mode UI
  • Import / export rules as JSON

Features

Feature Description
Text Rules Replace any word or phrase with one or more random targets
Image Rules Replace images by URL pattern, alt text, domain, or CSS class
Presets Built-in rules for the usual suspects — toggle on/off with one click
Random Variants Define multiple replacements — one is picked at random each time
Case Handling Automatically handles UPPERCASE, lowercase, and Mixed Case
Dark / Light Mode Clean UI in both themes
Import / Export Backup and share your rules as JSON
Live Preview Test your rules before unleashing them on the web
Dynamic Content MutationObserver handles SPAs and lazy-loaded content
No permissions bloat Only requires storage — no tab history, no network access

Presets

WordSwap ships with opinionated defaults:

Original Replacements
Microsucks Microslop · Microsucks · M$oft
Windoof Winblows · Crashville · Blue Screen OS
Apple Crapple · iFail · Overpriced Fruit
Google Googlag · Big Data Dealer · The Algorithm
Meta Zuckerberg's Circus · MetaSlop · Facepalm
Twitter Twatter · Elon's Playground
TikTok TikTrap · Attention Sink
NFT Digital Garbage · JPG Scam
AI Autocomplete on Steroids · Statistics Magic
the cloud someone else's computer

All presets are toggle-able. Enable only what you need.

Installation

From source (Developer Mode)

git clone https://github.com/leotrax3d/WordSwap.git
  1. Open Chrome and navigate to chrome://extensions/
  2. Enable Developer mode (top right toggle)
  3. Click Load unpacked
  4. Select the cloned WordSwap folder

Done. The extension icon appears in your toolbar.

Usage

Text Rules

Click the extension icon → Text tab.

Toggle any preset on/off. For custom rules, go to + New:

  1. Enter the word or phrase to replace
  2. Add one or more replacement targets (press Enter after each)
  3. If you add multiple targets, one is picked at random on every page load
  4. Toggle case sensitivity if needed
  5. Click Add Rule

Image Rules

Click the extension icon → Images tab.

  1. Choose a match type:
    • Image URL contains — matches against the src attribute
    • Alt text contains — matches against the alt attribute
    • Image domain contains — matches the hostname of the image URL
    • CSS class contains — matches the element's class list
  2. Enter a search term (e.g. microslop, logo, apple.com)
  3. Paste a replacement image URL — any public JPG, PNG, GIF, or WebP
  4. A live thumbnail preview appears while you type
  5. Click Add Image Rule

Testing Rules

Use the Test tab to paste text and see a live highlighted preview of all active replacements — without touching any real page.

Import / Export

Use the ↑ Export and ↓ Import buttons in the footer to save and restore your rule set as a .json file. Useful for sharing setups or backing up before a reset.

Project Structure

WordSwap/
├── manifest.json     # Extension manifest (MV3)
├── content.js        # Page-level text + image replacement engine
├── popup.html        # Extension popup UI
└── popup.js          # Popup logic — rules, storage, UI interactions

How It Works

Text replacement walks the DOM via TreeWalker-style recursion, operating only on Text nodes. Script, style, input, and code elements are skipped. A MutationObserver re-runs the engine on any newly added nodes, covering SPAs and infinite scroll.

Image replacement scans all <img> elements and checks src, data-src, data-lazy-src, and other common lazy-load attributes against active rules. Once replaced, images are marked with data-ws-replaced to prevent double-processing.

All rules are stored with chrome.storage.local — nothing leaves your machine.

Contributing

Pull requests are welcome. For major changes, open an issue first to discuss what you'd like to change.

git clone https://github.com/leotrax3d/WordSwap.git
cd WordSwap
# Load unpacked in chrome://extensions/ and start hacking

Ideas & Roadmap

  • Per-domain enable/disable rules
  • Regex support for advanced matching
  • Highlight replaced words on the page with a flash animation
  • Hover tooltip showing the original word
  • Rule usage statistics (how many times each rule fired)
  • Drag-and-drop rule reordering

License

MIT © leotrax3d

About

Microsoft, Meta, Apple — it all sucks. Now WordSwap hits back.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors