Subscribe Youtube Channel Muxic 0.9 ♪ Contact Us Subscribe!

How to Enjoy Ad-free YouTube Videos by Bypassing Ads-block Detection | Disable YouTube Ads Popup

Experience uninterrupted viewing with our tips on enjoying ad-free YouTube videos! Outsmart ad-block detection for a cleaner, smoother watch.
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated

Disable YouTube Ads Popup

YouTube continues to be a dominant force in the ever-changing world of online content, offering a wide selection of videos on subjects ranging from entertainment to education. But as YouTube takes a stand against the use of ad-blockers, new changes to the website have spurred a discussion within the community.


A recent Reddit post details how YouTube is now notifying users who use ad-blockers via pop-up windows. This action is a part of YouTube's continuous efforts to guarantee that content producers get paid fairly for their work. Although it is evident what the aim is, consumers are investigating solutions and wondering how it will affect their viewing experience.



The purpose of the pop-up warning is to inform users about the possible drawbacks of using ad-blockers and persuade them to turn off these extensions in order to help content creators by way of ad revenue. It's no secret that YouTube depends heavily on advertisements for its primary funding, and the company clearly makes an attempt to strike a careful balance between maintaining its ecology and providing a positive user experience.

Users may find the pop-up warning to be bothersome since it breaks the smooth viewing experience they have become used to. It calls into question if YouTube's campaign against ad-blockers is the proper course of action as well as users' autonomy to choose their viewing environment.


It's important to recognize the difficulties content creators have making money off of their work, though. For many people, YouTube has become their primary source of income, and their capacity to regularly create high-quality video is directly impacted by the money made from advertisements. When viewed in this context, YouTube's request to turn off ad-blockers comes off as a request for a just exchange: free content in return for a brief moment of our time.

If setting ad-blockers is not an option, it is imperative that we as consumers think of other ways to show our support for our favorite content creators. Bypassing the difficulties associated with advertisements, platforms such as Patreon and Buy Me a Coffee offer fans direct ways to make cash contributions to the creators they adore.


To sum up, the latest pop-up warning on YouTube serves as a helpful reminder of the complex connection that exists between viewers and content providers. While the pros and cons of ad-blocker use are still up for debate, it's critical to strike a compromise so that creators receive just compensation without negatively impacting user experience. Our view of the symbiotic relationship between content providers and their audience must change as the online ecosystem does.

Method NO.1

Download Tampermonkey for your browser: 

Download

Open the Tampermonkey on your browser and go to Dashboard.

Copy And Click on the plus and add the "script" Then Paste

Script 👇

// ==UserScript==
// @name         Youtube Anti-anti-adblock
// @namespace    http://github.com/planetarian/TamperMonkey-Scripts
// @version      0.12
// @description  Replaces the youtube video player with a youtube embed iframe to subvert the anti-adblock measures.
// @author       cracked.io/@Sc00bii
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @updateURL    https://github.com/planetarian/TamperMonkey-Scripts/raw/main/YoutubeAntiAntiAdblock.user.js
// @downloadURL  https://github.com/planetarian/TamperMonkey-Scripts/raw/main/YoutubeAntiAntiAdblock.user.js
// @grant        GM_addStyle
// ==/UserScript==

/*

YT player locations:

body
  > #player > #player-wrap > #player-api
  > ytd-app > #content > #page-manager > ytd-watch-flexy
    > #full-bleed-container
    > #columns > #primary > #primary-inner > #player > #player-container-outer > #player-container-inner > #container
      > #player-container > #ytd-player > #container
        > #movie_player > .html5-video-container > video //before
        > #movie_player > #aab-embed                     //after

*/

(function() {
    'use strict';

    function log(message) {
        console.log("AAB: " + message);
    }

    function callPlayer(func, args) {
        if (!embed) return;
        embed.contentWindow.postMessage(JSON.stringify({
            'event': 'command',
            'func': func,
            'args': args || []
        }), '*');
    }

    // get the video ID of the video currently being watched
    function youtube_parser(url){
        var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
        var match = url.match(regExp);
        return (match&&match[7].length==11)? match[7] : false;
    }

    // replace the youtube player with the embed
    function replacePlayer(videoId, timestamp) {
        // movie_player contains all the player controls, get rid of them and replace with the embed
        const player = document.getElementById('movie_player');
        if (!player && !embed) {
            // We're still loading the initial page; do nothing
            log("page loading; skipping.");
            return false;
        }

        log("checking for video player.");
        const videoEls = player.getElementsByClassName('html5-main-video');

        if (videoEls.length > 1) {
            log("there seem to be multiple video players?");
        }

        // if we have an html5 player (no anti-adblock)
        if (videoEls.length > 0 && !!videoEls[0].src) {
            log("html5 player present. using that instead.");
            if (embed) {
                log("removing embed.");
                embed.remove();
                embed = undefined;
            }
        }
        // if there's no html5 player (anti-adblock present)
        else {
            log("no html5 player present. adding embed.");
            // remove the notice
            const errorOverlay = document.getElementById('error-screen');
            if (errorOverlay) {
                errorOverlay.remove();
                log("error overlay removed.");
            }
            var src = `https://www.youtube.com/embed/${videoId}?enablejsapi=1`;
            if (!!timestamp && timestamp.length) {
                let time = timestamp[0]
                time = time.replace(/s$/, '');
                src += `&start=${time}`
            }
            if (embed) {
                embed.src = src;
                player.innerHtml = '';
                player.appendChild(embed);
            }
            else {
                // replace the player
                player.innerHTML = `<iframe id="aab-embed" width="100%" height="100%" src="${src}" allow="autoplay"></iframe>`;
                embed = document.getElementById('aab-embed');
            }
            callPlayer('playVideo');
            log("YouTube player replaced with embed iframe.");
            return true;
        }
    }

    // replace player again after the user navigates to a new video
    document.addEventListener("yt-navigate-finish", function(event) {
        stage = 0;
        // clear the embed if we've added it already
        const embed = document.getElementById('aab-embed');
        if (embed) embed.remove();
        // replace the video on the new page
        const videoId = youtube_parser(document.location.href);
        if (!videoId) return;
        const url = new URL(document.location.href);
        replacePlayer(videoId, url.searchParams.getAll('t'));
    });

    // unhide the player container stuff in case anti-adblock hid it
    GM_addStyle('ytd-watch-flexy[player-unavailable] #player-container-outer.ytd-watch-flexy { visibility: visible !important; }');

    // hold onto the embed for later reference
    var embed = null;

    const descObserver = new MutationObserver(textContainersMutated);
    const commentsObserver = new MutationObserver(commentsContainerMutated);
    const textObserver = new MutationObserver(textContainersMutated);

    // set up the mutation observer to monitor for when the player is added
    const pageManager = document.getElementById('page-manager');
    const pageObserver = new MutationObserver(pageMutated);
    try {
        log("observing page manager.");
        pageObserver.observe(pageManager, { childList: true });
    }
    catch (error) {
        log("couldn't observe page manager.");
    }

    var stage = 0;
    const observingTag = 'aab-observing';

    function pageMutated(mutationList, observer) {
        if (stage >= 2) return;

        for (const mutation of mutationList) {
            if (mutation.type === "childList") {
                log(`anti-anti-adblock reacting to element mutation. Stage ${stage}`);
                if (stage === 0) {
                    // looking for the main player container
                    const playerContainer = document.getElementById('player');
                    if (!playerContainer) {
                        log("no player container found.");
                        continue;
                    }

                    addTextObservers();

                    // the actual player itself hasn't been added yet
                    // so we need to monitor the element it'll be added to
                    const ytdPlayer = document.getElementById('ytd-player');
                    const ytdContainer = ytdPlayer.getElementsByClassName('ytd-player');
                    if (ytdContainer.length == 1) {
                        pageObserver.disconnect();
                        stage = 1;
                        log("observing containers.");
                        pageObserver.observe(ytdContainer[0], { childList: true });
                    }
                }
                else if (stage === 1) {
                    // should have the player ready to replace now
                    const videoId = youtube_parser(document.location.href);
                    if (!videoId) {
                        log("not a video page.");
                        continue;
                    }
                    const url = new URL(document.location.href);
                    if (!replacePlayer(videoId, url.searchParams.getAll('t'))) continue;

                    pageObserver.disconnect();
                    stage = 2;
                }
            }
        }
    }

    function addTextObservers() {
        const desc = document.querySelectorAll('#description-inline-expander yt-attributed-string')[0];
        if (desc && !desc.classList.contains(observingTag)) {
            try {
                log("observing video description.");
                descObserver.observe(desc, { childList: true });
                desc.classList.add(observingTag);
            }
            catch (error) {
                log("couldn't observe video description.");
                console.error(error);
            }
        }

        const comments = document.querySelectorAll('#comments')[0];
        if (comments && !comments.classList.contains(observingTag)) {
            try {
                log("observing comments section.");
                commentsObserver.observe(comments, { childList: true });
                comments.classList.add(observingTag);
            }
            catch (error) {
                log("couldn't observe comments section.");
                console.error(error);
            }
        }
    }

    function commentsContainerMutated(mutationList, observer) {
        log("comments section mutated.");
        for (const mutation of mutationList) {
            const comments = document.querySelectorAll('#comments > #sections > #contents')[0];
            textObserver.observe(comments, { childList: true });
        }
    }

    function textContainersMutated(mutationList, observer) {
        for (const mutation of mutationList) {
            for (let i = 0; i < Array.from(mutation.addedNodes).length; i++) {
                const node = mutation.addedNodes[i];
                const links = node.querySelectorAll('#comment #body #comment-content #content-text a');
                if (!links.length) continue;

                for (let l = 0; l < links.length; l++) {
                    const link = links[l];
                    const taggedClass = 'aab-link';
                    if (link.classList.contains(taggedClass)) continue;

                    link.classList.add(taggedClass);
                    const matches = /(?:(?<hh>\d\d?):)?(?<mm>\d\d?):(?<ss>\d\d?)/.exec(link.innerText);
                    if (!matches) continue;

                    let timestamp = (Number(matches.groups.mm)*60)+Number(matches.groups.ss);
                    if (matches.groups.hh > 0) {
                        timestamp += Number(matches.groups.hh) * 60 * 60;
                    }

                    log(`found timestamp ${timestamp}`);
                    link.addEventListener('click', (ev) => {
                        log(timestamp);
                        callPlayer('playVideo');
                        callPlayer('seekTo', [timestamp]);
                    });
                }
            }
        }
    }

})();

Method NO.2

Download and install uBlock Origin for your browser:   Link Button Example
  • Remove all existing adblock extensions on your browser.
  • Select “uBlock Origin” from extensions tab and click on the settings icon.
  • Click on the “My filters” tab.

Copy and paste the following code:

youtube.com##+js(set, yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel, false) 
youtube.com##+js(set, Object.prototype.adBlocksFound, 0)
youtube.com##+js(set, ytplayer.config.args.raw_player_response.adPlacements, [])
youtube.com##+js(set, Object.prototype.hasAllowedInstreamAd, true)  
  •  Click on “Apply changes” and try watching some YouTube videos.
  •  Done! The YouTube Ad blockage popup as well as the Ads should be gone now.

Method NO.3

Install User Agent Switcher & Manager Extension. Then change your user agent.
Chrome/Edge 
Add Extension
Firefox
Add Extension

Method NO.4

Install this extension from Google Chrome Store:
Add Extension



About the Author

Welcome to my Site! Hi, this is Mr.Abdullah. If you have any questions related to this blog you can find us here on Instagram @abdullahdcurz Or, you can mail us here: abdullahdcurz@mail.com. Thank you.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.