A Firefox WebExtension that automatically detects profanity in subtitles, mutes audio during profanity, and displays censored subtitles overlaying the video.
- Subtitle Upload: Load SRT, ASS, or WEBVTT subtitle files
- Auto-Detection: Automatically detects subtitles on supported streaming sites
- Profanity Detection: Multi-layered detection using:
- Wordlist matching (exact)
- Obfuscation patterns (regex)
- Fuzzy matching (Levenshtein distance)
- Context-aware filtering (religious terms whitelist)
- Audio Control: Automatically mute the tab when profanity is detected
- Censored Overlay: Display subtitles with profanity replaced by
[CENSORED]or fun alternatives - Timing Sync: Adjust subtitle timing with real-time preview
- Privacy-First: All processing happens locally in your browser
The extension can automatically detect and extract subtitles from:
- YouTube (auto-generated and uploaded captions)
- Jellyfin (local and remote instances, HLS streams, native and embedded subtitles)
- LookMovie
- FMovies
- PlutoTV (partial)
- 123Chill (partial)
- Clone this repository
- Run
npm installto install dependencies - Run
npm run buildto build the extension - Open Firefox and navigate to
about:debugging - Click "This Firefox" → "Load Temporary Add-on"
- Select the manifest file from the
distfolder
npm run packageThis creates artifacts/ffprofanity-1.0.0.xpi for distribution.
npm run dev # Build for development
npm run build # Build for production (creates XPI)
npm run test # Run test suite
npm run test:watch # Run tests in watch modesrc/
├── background/ # Service worker (mute control, message routing)
├── content/ # Content script (overlay rendering, video sync)
├── popup/ # Toolbar popup UI
├── options/ # Settings page UI
├── extractors/ # Site-specific subtitle extractors
├── page-scripts/ # Injected scripts for streaming sites
└── lib/ # Core libraries
├── detector.ts # Profanity detection engine
├── parser.ts # Subtitle format parsers (SRT/VTT/ASS)
├── cueIndex.ts # O(log n) time-based lookup
├── storage.ts # Extension storage helpers
├── substitutions.ts # Fun word replacements
└── wordlist.ts # Profanity wordlist
- Language: TypeScript
- Build: esbuild (fast bundling)
- Test: Vitest with jsdom
- Platform: Firefox WebExtension Manifest V3
- Click the extension icon to open the popup
- Click "Options" to open the settings page
- Upload your subtitle file (SRT, ASS, or WEBVTT) - or use auto-detection
- Adjust the profanity detection sensitivity:
- High: Mute entire caption when profanity detected
- Medium: Mute only the profanity word (balanced buffering)
- Low: Mute only the profanity word (minimal buffering)
- Choose substitution style:
[CENSORED]text- Fun alternatives (silly, polite, random, monkeys)
- Use the offset slider to sync subtitles with video
- Play your video and enjoy profanity-free viewing
| Shortcut | Action |
|---|---|
Alt+Left |
Decrease subtitle offset |
Alt+Right |
Increase subtitle offset |
The project has 109 tests covering:
- Subtitle parsing (SRT, VTT, ASS formats)
- Profanity detection (exact, fuzzy, obfuscation patterns)
- Profanity window timing calculations
- Cue index time-based lookups
npm run testThis extension is designed with privacy as the primary concern:
- No external servers: All subtitle processing is done locally
- No telemetry: No usage data is sent anywhere
- No network calls: The extension works completely offline
- Local storage only: Settings and subtitles are stored in browser storage
- No tracking: No analytics or third-party scripts
The extension requests minimal permissions:
| Permission | Purpose |
|---|---|
storage |
Save settings and subtitles |
tabs |
Mute/unmute tab audio |
activeTab |
Access current tab for overlay |
webNavigation |
Detect page loads for auto-extraction |
webRequest |
Intercept subtitle network requests |
MIT License - see LICENSE file for details.