Skip to content

tizee-tampermonkey-scripts/tampermonkey-ytb-adblocker-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

YouTube Ad Blocker Popup Remover

Tampermonkey Greasy Fork License

A Tampermonkey userscript that automatically detects and removes YouTube's anti-ad-blocker popup messages, allowing you to continue watching videos uninterrupted.

Features

  • 🚀 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

Installation

  1. Ensure you have a userscript manager installed:

  2. Click the install link:

  3. Confirm installation in your userscript manager

How It Works

The script uses several techniques to detect and remove YouTube's ad-blocker popups:

  1. 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)
  2. Content Detection:

    • Scans for known anti-ad-blocker keywords/phrases
    • Checks both visible text and hidden content
  3. 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

Technical Details

  • Browser Support: Works on all modern browsers (Chrome, Firefox, Edge, etc.)
  • Execution Time: Runs at document-start for earliest possible detection
  • Update Mechanism: Built-in update URL checks for new versions

Troubleshooting

If the script isn't working:

  1. Ensure your ad blocker is up-to-date
  2. Check Tampermonkey is enabled for YouTube
  3. Verify the script is running (look for [YT-POPUP-KILLER] in console logs)
  4. Try clearing YouTube cookies/cache
  5. Open an issue on GitHub with details

Changelog

v1.1.0

  • Added additional detection keywords
  • Improved MutationObserver handling
  • Added periodic scanning with fast/slow modes
  • Enhanced URL change detection for SPAs

v1.0.0

  • Initial release with basic popup detection and removal

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This script is provided for educational purposes only. Using ad blockers may violate YouTube's Terms of Service. Use at your own risk.

About

A script that automatically remove YouTube's anti-ad-blocker popup messages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published