That post seems to be missing.
load all comments
Honse 96 points 3 years ago

I'm going to start a discussion in the comments here about methods to bypass the message. I will add suggestions here, so leave comments if you find a method!

Methods to bypass Youtube Anti-Adblock:

  • The easiest method is simply to comply and turn off your adblock extension.

My Method

  • My method, and the one that will likely work universally is as follows:

Install Extension Enhancer for YouTube™

Go to the extensions settings and ensure that under the Ads Management section, "Block Ads" is turned OFF

Now find the Custom Script box at the very bottom and enter the following script. I did not write this code, it comes from egaudette on GitHub

(function() {
    'use strict';
    var clickInterval = setInterval(skipAds, 5);
    var ytpAdModule;
    var miniAdd;
    var skipButton;
    var currentVideo;

    function skipAds() {
        ytpAdModule = document.querySelector('.ytp-ad-module');
        skipButton = document.querySelector('button[class*="ad-skip"]');
        miniAdd = document.querySelector('.ytp-ad-overlay-container');

        if (ytpAdModule !== null && ytpAdModule.innerHTML !== '') {
            ytpAdModule.style.display = 'none';
        }

        if (skipButton !== null) {
            skipButton.click();
            return;
        }

        currentVideo = document.querySelector('video[class*="main-video"]')
        if (currentVideo !== null && currentVideo.duration <= 30) {
            currentVideo.muted = true;
            currentVideo.play();
            currentVideo.currentTime = currentVideo.duration;
        }
    }
})();

Lastly, ensure the "Automatically execute the script when YouTube is loaded in a tab" box is checked, and press Save


I'll add more methods as they are discovered!

path: 0 2932201, hotness: undefined, score: 96, children: 5
Neato 21 points 3 years ago

Why would this work when others get blocked? Is it a novel way to block YT ads that's not popular? Because I think YT isn't looking for specific extensions but looking for certain kinds of behavior.

path: 0 2932201 2932497, hotness: undefined, score: 21, children: 2
Honse 55 points 3 years ago

This method lets ads load for half a second but then get skipped instantly. i have not personally found a way to 100% block ads once ive gotten their block page.

path: 0 2932201 2932497 2933930, hotness: undefined, score: 55, children: 1
nilloc 1 point 3 years ago

I use greasemonkey to do a similar trick with the skip and dismiss buttons. But added random delays up to 2 seconds in an attempt to mimic a human clicking the button.

Also instead of an interval running, you can use MutationObserver and a callback to only run the code when the DOM changes and adds the button.

path: 0 2932201 2932497 2933930 2997553, hotness: undefined, score: 1, children: 0

thanks for using Leebra!

go to feed...