Greasy Fork

Universal AdBlock Bypass (Beta)

Attempts to bypass ad-blocker detection on all websites

目前为 2025-04-29 提交的版本。查看 最新版本

作者
Snow2122
评分
0 0 0
版本
1.0
创建于
2025-04-29
更新于
2025-04-29
大小
3.0 KB
许可证
MIT
适用于
所有网站

Universal AdBlock Bypass Script (Beta)

Purpose:
The Universal AdBlock Bypass script is a Tampermonkey userscript designed to bypass ad-blocker detection mechanisms on websites across the internet. Many websites detect ad blockers and restrict access by displaying messages or overlays (e.g., "Please disable your ad blocker to continue"). This script aims to circumvent these restrictions, allowing users to access website content seamlessly while using an ad blocker.

Functions and Operation:
The script operates by targeting common ad-blocker detection techniques and neutralizing them. Here’s a breakdown of its key functions and how it works:

  1. Override Detection Variables and Functions:

    • The script sets flags like window.ai_adb_active to true and window.ai_adb_action to 0, simulating a state where ad-blocker detection has already been processed or disabled. This prevents the website from triggering its ad-blocker response (e.g., overlays or redirects).
    • It overrides the window.ai_adb_undetected function to mimic a "no ad-blocker detected" state, ensuring the website loads content as if no ad blocker is present.
  2. Simulate Successful Ad Script Loading:

    • The script intercepts window.fetch requests for common ad-related URLs (e.g., those containing pagead, ads., or doubleclick) and returns a fake successful response. This tricks the website into thinking ad scripts loaded correctly, even if they were blocked by an ad blocker.
  3. Remove Ad-Blocker Overlays and Messages:

    • It actively removes DOM elements commonly used for ad-blocker messages or overlays, such as <ins>, <section>, or elements with classes like .ad-block-message, .ai-adb-overlay, or .adblock-notice. A MutationObserver continuously monitors the DOM for dynamically added elements and removes them as they appear.
  4. Clear Ad-Blocker Detection Cookies:

    • The script deletes cookies commonly used by ad-blocker detection systems (e.g., aiADB, aiADB_PV, adblock_detected) to prevent persistent detection across sessions.
  5. Restore Content Visibility:

    • It ensures website content is visible by manipulating elements with classes like .ai-adb-hide or .adblock-hidden (making them visible) and hiding elements like .ai-adb-show or .adblock-show (which are typically ad-blocker messages).
  6. Initialization and Monitoring:

    • The script runs when the DOM is loaded (via DOMContentLoaded event) to apply its bypass logic immediately. It also uses a MutationObserver to monitor the DOM for changes, ensuring that any late-loaded ad-blocker messages or overlays are removed in real-time.

How It Operates:
The script is triggered on all websites (*://*/*) and executes automatically when a page loads. It first overrides detection mechanisms, clears cookies, and removes any existing ad-blocker messages. It then ensures content visibility by adjusting DOM elements. The MutationObserver ensures continuous protection by handling dynamically added elements, making the script resilient to late detection attempts.

Beta Mode Notice:
This script is currently in beta mode, meaning it is still under active development and testing. While it aims to bypass ad-blocker detection universally, you may encounter errors or websites where it does not work due to unique or complex detection methods. If you experience any issues (e.g., the script fails to bypass detection, or the website behaves unexpectedly), please report the details—such as the website URL, the ad-blocker message displayed, or any error messages—so we can improve the script. Your feedback is crucial for refining its effectiveness across a broader range of websites.

License Information:
This script is released under the MIT License, allowing you to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the script, subject to the conditions outlined in the MIT License (see https://opensource.org/licenses/MIT for details).

Usage Caution:
Note that using this script may violate some websites’ terms of service. Use it responsibly and at your own discretion.