Ads in Youtube suddenly starts popping while the the option "Block all ads and trackers" is enabled. Already checked other websites and the adblocker works on them.


Using Min v1.15.0
HI! I'm using userscript for this. Here it goes:
// ==UserScript==
// @name No more youtube ads! - UPDATED
// @name:zh-CN 闅愯棌youtube google骞垮憡
// @namespace FaZe BeeF
// @version 1.0.3
// @description Automaticly Skips all youtube ads! with no waiting time.
// @description:zh-CN BF5 : This skips all adds instantly. Youtube.com
// @author FaZe BeeF
// @match *://www.youtube.com/*
// ==/UserScript==
(function() {
'use strict';
var closeAd=function (){
var css = '.video-ads .ad-container .adDisplay,#player-ads,.ytp-ad-module,.ytp-ad-image-overlay{ display: none!important; }',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
};
var skipInt;
var log=function(msg){
// unsafeWindow.console.log (msg);
};
var skipAd=function(){
//ytp-ad-preview-text
//ytp-ad-skip-button
var skipbtn=document.querySelector(".ytp-ad-skip-button.ytp-button")||document.querySelector(".videoAdUiSkipButton ");
//var skipbtn=document.querySelector(".ytp-ad-skip-button ")||document.querySelector(".videoAdUiSkipButton ");
if(skipbtn){
skipbtn=document.querySelector(".ytp-ad-skip-button.ytp-button")||document.querySelector(".videoAdUiSkipButton ");
log("skip");
skipbtn.click();
if(skipInt) {clearTimeout(skipInt);}
skipInt=setTimeout(skipAd,500);
}else{
log("checking...");
if(skipInt) {clearTimeout(skipInt);}
skipInt=setTimeout(skipAd,500);
}
};
closeAd();
skipAd();
})();
@Casul51's solution worked for me, did it work for you @mtgperales?
Sorry for the late response i was out of town for like a week.
I've installed a new Arch distro on my laptop and immediately installed min from the official repositories. So far i haven't yet encountered the issue again but will try to use @Casul51 script if the problems comes back.
I have encountered the problem again so i tried Casul51's script and it works. Thanks
Most helpful comment
HI! I'm using userscript for this. Here it goes: