A Tampermonkey userscript that automatically detects and removes YouTube's anti-ad-blocker popup messages, allowing you to continue watching videos uninterrupted.
- 🚀 Instant detection - Removes popups as soon as they appear
- 🔍 Comprehensive scanning - Uses multiple detection methods:
- MutationObserver for real-time DOM changes
- Periodic scanning (fast and slow modes)
- Page load/visibility change detection
- URL change detection for SPAs
- 🛡️ Robust filtering - Checks both element structure and content text
- 📊 Logging - Optional debug logging (visible in console)
- ⚡ Lightweight - No external dependencies
- 🔄 Auto-updating - Built-in update checking
-
Ensure you have a userscript manager installed:
- Tampermonkey (recommended)
- Violentmonkey
- Greasemonkey
-
Click the install link:
-
Confirm installation in your userscript manager
The script uses several techniques to detect and remove YouTube's ad-blocker popups:
-
Structural Detection:
- Looks for specific YouTube popup containers (
ytd-popup-container) - Verifies the presence of dialog components (
tp-yt-paper-dialog) - Checks for enforcement message views (
ytd-enforcement-message-view-model)
- Looks for specific YouTube popup containers (
-
Content Detection:
- Scans for known anti-ad-blocker keywords/phrases
- Checks both visible text and hidden content
-
Multiple Monitoring Methods:
- Immediate scan on script load
- Fast scanning (100ms intervals) for first 5 seconds
- Slower scanning (2s intervals) for next 55 seconds
- Continuous MutationObserver monitoring
- Page load/visibility change detection
- URL change detection for single-page applications
- Browser Support: Works on all modern browsers (Chrome, Firefox, Edge, etc.)
- Execution Time: Runs at
document-startfor earliest possible detection - Update Mechanism: Built-in update URL checks for new versions
If the script isn't working:
- Ensure your ad blocker is up-to-date
- Check Tampermonkey is enabled for YouTube
- Verify the script is running (look for
[YT-POPUP-KILLER]in console logs) - Try clearing YouTube cookies/cache
- Open an issue on GitHub with details
- Added additional detection keywords
- Improved MutationObserver handling
- Added periodic scanning with fast/slow modes
- Enhanced URL change detection for SPAs
- Initial release with basic popup detection and removal
Contributions are welcome! Please open an issue or pull request on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.
This script is provided for educational purposes only. Using ad blockers may violate YouTube's Terms of Service. Use at your own risk.