-
-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Youtube ads aren't blocked #1121
Comments
HI! I'm using userscript for this. Here it goes:
|
@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. Update:I have encountered the problem again so i tried Casul51's script and it works. Thanks |
Adding a link to the userscript: https://greasyfork.org/en/scripts/407477-no-more-youtube-ads-updated/code |
Does the user script still valid? Since last two days i see that youtube ads show on playing. |
Hey! I tried it today and it is working. :) |
Hi, any workaround about this? Thank you. |
how to use? |
Yes local ads unskippable in 1 second. I got 2 ads playing in a row. |
Yeah, YouTube has changed some things which make the script not work sometimes. And I couldn't find any other userscript that fixes that issue. A somewhat viable alternative is using an invidious instance, like yewtu.be or inv.riverside.rocks. Those come with the added bonus that you can also watch age restricted videos, but have some feature drawbacks (feed isn't infinite, livestreams don't really work, ..). More complete list of trusted public instances here. |
I'm going to ressurect this thing of an issue, and share a new script i found on the web, that works ootb without any issues for me on all videos currently. // ==UserScript==
// @name YouTube - Ad Skip
// @version 1.0
// @description Skips and removes ads on YouTube automatically
// @author Bobocato
// @match https://www.youtube.com/*
// @grant none
// @namespace https://greasyfork.org/users/167089
// ==/UserScript==
const equalText1 = "Skip Ads";
const equalText2 = "Skip Ad";
function addNewStyle(newStyle) {
var styleElement = document.getElementById('styles_js');
if (!styleElement) {
styleElement = document.createElement('style');
styleElement.type = 'text/css';
styleElement.id = 'styles_js';
document.getElementsByTagName('head')[0].appendChild(styleElement);
}
styleElement.appendChild(document.createTextNode(newStyle));
}
function skipAd(){
console.log("Tried to skip a ad");
if(document.getElementsByClassName("ytp-ad-skip-button").length > 0){
if(document.getElementsByClassName("ytp-ad-skip-button")[0].childNodes[0].textContent === equalText1 || document.getElementsByClassName("ytp-ad-skip-button")[0].childNodes[0].textContent === equalText2){
document.getElementsByClassName("ytp-ad-skip-button")[0].click();
} else {
setTimeout(skipAd(), 1000);
}
}
}
(function() {
'use strict';
addNewStyle('.ytp-ad-overlay-slot {display:none !important;}');
setInterval(function (){
if(window.location.href.substring(0,30) == "https://www.youtube.com/watch?"){
skipAd();
}
}, 500);
})(); I modified a single value, which is the 500 at the bottom. It's the time in which period it constantly tries to skip ads as long as videos are playing. in my case, it searches every half a second for an ad, and skips it if it appears, no matter if the button says "skip in x seconds" or "skip now". Now, 500 may seem a bit overkill. The default was at 1500, which i myself found a little too annoying. So yea, if you can spare the pc-performance like me, you can go lower than 1500, if you can't, you can always change it and restart your browser afterwards to update it. |
this one doesn't work for me but this one from Ftwrr works very well : #1121 (comment). |
Both the scripts doesn't work anymore, does someone have any solution? |
@javisgn This userscript works for me. Alternatively, GreasyFork is a good source of user scripts. |
I can confirm that it worked for me |
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
The text was updated successfully, but these errors were encountered: