A Chrome extension (Manifest V3) that blocks video playback on YouTube, TikTok, and Instagram Reels until the user solves a CAPTCHA overlay.
- 🔒 Automatic Video Blocking: Detects and pauses video elements on supported sites
- 🎨 Customizable Themes: Choose between dark and light themes for the CAPTCHA overlay
- ⚡ Real-time Detection: Uses MutationObserver to catch dynamically loaded videos
- 🎯 Multi-Platform Support: Works on YouTube, TikTok, and Instagram Reels
- 💾 Persistent Settings: Theme preferences saved with Chrome storage sync
- 🎮 Smart Video Control: Uses spacebar simulation for natural pause/resume
- 🔄 One CAPTCHA Per Video: Each video requires only one CAPTCHA solution
- 📱 Site-Specific Behavior: TikTok videos play behind CAPTCHA, others pause completely
- YouTube (youtube.com and all subdomains)
- TikTok (tiktok.com and all subdomains) - Videos play behind CAPTCHA
- Instagram Reels (instagram.com) - Videos pause completely
-
Clone the repository:
git clone <your-repo-url> cd video-captcha-blocker
-
Load in Chrome:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
extension/folder - The extension should now appear in your extensions list
- Open Chrome and go to
-
Development workflow:
- Edit files directly in the
extension/folder - Reload the extension in Chrome to test changes
- No build process required!
- Edit files directly in the
- Zip the
extension/folder - Upload to Chrome Web Store (requires developer account)
├── extension/ # Extension files (load this folder in Chrome)
│ ├── manifest.json # Extension manifest (Manifest V3)
│ ├── background/ # Background script
│ │ └── background.js
│ ├── content/ # Content scripts
│ │ └── content.js # Main CAPTCHA logic
│ ├── popup/ # Extension popup
│ │ ├── popup.html
│ │ └── popup.js
│ ├── options/ # Options page
│ │ ├── options.html
│ │ └── options.js
│ ├── assets/ # Static assets
│ │ ├── icons/ # Extension icons
│ │ └── styles/ # CSS files
│ └── utils/ # Utility files
│ └── constants.js
├── package.json # Minimal dependencies
├── package-lock.json # Dependency lock file
└── README.md
Note: This project uses a clean, organized structure with no build process. All extension files are directly editable in the extension/ folder.
-
Content Script: The
content.jsscript runs on supported websites and:- Detects existing
<video>elements - Monitors for new videos added to the page using MutationObserver
- Tracks URL changes for single-page applications (Instagram Reels)
- Pauses videos immediately when detected (except TikTok)
- Injects the CAPTCHA overlay
- Detects existing
-
CAPTCHA Overlay: A native HTML/JavaScript interface that:
- Generates random text-based CAPTCHAs
- Provides a user-friendly interface with autoselect input
- Validates user input (case-insensitive, whitespace-tolerant)
- Automatically unblocks videos upon successful completion
- Tracks solved videos to prevent re-blocking
-
Site-Specific Behavior:
- TikTok: Videos continue playing behind the CAPTCHA overlay
- Instagram Reels: Videos pause completely until CAPTCHA is solved
- YouTube: Videos pause completely until CAPTCHA is solved
-
Options Page: Allows users to:
- Choose between dark/light themes
- View extension information
- Settings are saved with
chrome.storage.sync
- Edit files directly in the
extension/folder - Reload the extension in Chrome (
chrome://extensions/→ click reload) - Test changes on supported sites
- No build process required!
To support additional video sites:
- Add the domain to
manifest.jsonundercontent_scripts.matches - Add the domain to
host_permissions - Test the extension on the new site
The CAPTCHA logic is in extension/content/content.js. You can:
- Modify the CAPTCHA generation algorithm in the
generateCaptcha()function - Change the visual appearance in the
injectOverlay()function - Add different types of challenges
- Implement more complex validation
- Add AI-generated CAPTCHAs using external APIs
- Background Script:
extension/background/background.js - Content Script:
extension/content/content.js - Popup:
extension/popup/popup.htmlandextension/popup/popup.js - Options:
extension/options/options.htmlandextension/options/options.js - Utilities:
extension/utils/constants.js - Assets:
extension/assets/icons/andextension/assets/styles/
- Chrome 88+ (Manifest V3 support required)
- Other Chromium-based browsers (Edge, Brave, etc.)
- No data is sent to external servers
- All settings stored locally using Chrome's storage API
- No tracking or analytics
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
- Ensure you're on a supported site (YouTube/TikTok/Instagram)
- Check that the extension is enabled in
chrome://extensions/ - Try refreshing the page after installing
- Check browser console for any error messages
- Check browser console for errors
- Verify content script permissions in manifest.json
- Ensure the extension is reloaded after making changes
- Try scrolling to a new video on TikTok/Instagram
- Check if you're on TikTok (videos play behind CAPTCHA by design)
- Verify the extension is active on the current site
- Check browser console for JavaScript errors
- This should not happen with the current implementation
- If it does, check browser console for errors
- Try reloading the extension