YouTube Ad Bypass

Block YouTube ads by stripping ad config before the player reads it. No delays, fully reactive.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
nec.d
Daily installs
0
Total installs
639
Ratings
2 1 0
Version
1.8
Created
2026-02-21
Updated
2026-05-09
Size
30.3 KB
License
MIT
Applies to

YouTube Ad Bypass

Blocks all YouTube ads by intercepting ad configuration before the player processes it. No visual flicker, no empty boxes.

Features

  • Blocks pre-roll, mid-roll, and post-roll video ads
  • Removes in-feed and sidebar ad slots
  • Blocks ad video streams
  • Dismisses YouTube's ad-blocker detection toast ("Experiencing interruptions?")
  • Hides Shorts from homepage and subscriptions (configurable)
  • Reactive design with a single short-lived sweep for the dismissal toast

How it works

Six-layer defense running at document-start:

Layer What it does
Property trap Intercepts ytInitialPlayerResponse and ytInitialData before the player reads them
JSON.parse override Catches ad data in inline JSON and data: URLs
Response.json override Strips ads from SPA navigation API responses
fetch/XHR interception Blocks ad video stream requests
CSS hiding Hides any ad UI elements that slip through
MutationObserver Removes enforcement popups and empty ad containers from the DOM

Configuration

Edit the CONFIG object at the top of the script:

const CONFIG = {
    blockShorts: true,   // Hide Shorts from homepage/subscriptions feed
};

Compatibility

  • Should work with Violentmonkey and other userscript managers
  • Requires @run-at document-start support