Closed Sp0kzz closed 2 weeks ago
Thank you so much, it works perfectly. I am even able to watch age restricted videos again and the replay meter on top of the bar is also there again
Sometimes less is more. This works without any issues so far.
hide it from youtube before it's too late
How is this so gooooooooood
does it work with youtube music?
thank you so much for the feedback guys, i have fixed a bug where the videoAd gets stuck :
// ==UserScript==
// @name Skip Youtube Ads
// @namespace http://tampermonkey.net/
// @version 2024-06-15
// @description Skip Youtube Ads Manually
// @author You
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
let ii=false;
const observer = new MutationObserver((mutations) => {
var btn = document.querySelector('.ytp-skip-ad-button');
if(btn) btn.click();
var btn2 = document.querySelector('.ytp-preview-ad__text');
var btn3 = document.querySelector('.ytp-ad-textt');
if((btn2 || btn3) && !ii){
let video=document.querySelector('video');
if(video) video.currentTime = 50;
ii=true;
setTimeout(function() {
ii=false;
}, 100);
}
});
observer.observe(document.body, { childList: true, subtree: true });
removePageAds();
function removePageAds(){
const style = document.createElement('style');
style.textContent = `
ytd-action-companion-ad-renderer,
ytd-display-ad-renderer,
ytd-video-masthead-ad-advertiser-info-renderer,
ytd-video-masthead-ad-primary-video-renderer,
ytd-in-feed-ad-layout-renderer,
ytd-ad-slot-renderer,
yt-about-this-ad-renderer,
yt-mealbar-promo-renderer,
ytd-statement-banner-renderer,
ytd-ad-slot-renderer,
ytd-in-feed-ad-layout-renderer,
ytd-banner-promo-renderer-background
statement-banner-style-type-compact,
.ytd-video-masthead-ad-v3-renderer,
div#root.style-scope.ytd-display-ad-renderer.yt-simple-endpoint,
div#sparkles-container.style-scope.ytd-promoted-sparkles-web-renderer,
div#main-container.style-scope.ytd-promoted-video-renderer,
div#player-ads.style-scope.ytd-watch-flexy,
ad-slot-renderer,
ytm-promoted-sparkles-web-renderer,
masthead-ad,
tp-yt-iron-overlay-backdrop,
#masthead-ad {
display: none !important;
}
`;
document.head.appendChild(style);
}
})();
Thank u so much, works on opera gx
If possible make a repository of this so in future direct updating of the script can be done
I agree with itzzVarun. You should make it an own repository instead of posting this in the issues tab. Don't know why the Remove Adblock Thing repository turned into a not working piece of shit. Thanks for the well working script :)
I agree with itzzVarun. You should make it an own repository instead of posting this in the issues tab. Don't know why the Remove Adblock Thing repository turned into a not working piece of shit. Thanks for the well working script :)
I was hoping the Remove Adblock Thing author can maybe implement it in the next update but yes i should make a rep.
This does not work in firefox
This does not work in firefox
Weird. It's working for me rn.
This is how I used it
This does not work in firefox
Weird. It's working for me rn.
This is how I used it
* Open the page to the video * Perform the following before actually playing the video (not sure if that's important) * Open the console with F12 * Paste the code * Type "allow pasting" * Hit enter * Play the video * Enjoy :D
Hey, I'm kinda new to all this stuff. Where do I go about pasting this code?
Hey, I'm kinda new to all this stuff. Where do I go about pasting this code?
Just use tampermonkey and paste the code in there
This does not work in firefox
try this improved way of skipping (also for everyone else), the older version had some issues like Remove Adblock 3.8 but this one i've been using it a lot and it always skips the ads:
// ==UserScript==
// @name Skip Youtube Ads
// @namespace http://tampermonkey.net/
// @version 2024-06-15
// @description Skip Youtube Ads Manually
// @author You
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
let ii=false;
const observer = new MutationObserver((mutations) => {
var btn = document.querySelector('.ytp-skip-ad-button');
if(btn) btn.click();
var btn2 = document.querySelector('.ytp-preview-ad__text');
var btn3 = document.querySelector('.ytp-ad-textt');
if((btn2 || btn3) && !ii){
let video=document.querySelector('video');
if(video) video.currentTime = 50;
ii=true;
setTimeout(function() {
ii=false;
}, 100);
}
});
observer.observe(document.body, { childList: true, subtree: true });
removePageAds();
function removePageAds(){
const style = document.createElement('style');
style.textContent = `
ytd-action-companion-ad-renderer,
ytd-display-ad-renderer,
ytd-video-masthead-ad-advertiser-info-renderer,
ytd-video-masthead-ad-primary-video-renderer,
ytd-in-feed-ad-layout-renderer,
ytd-ad-slot-renderer,
yt-about-this-ad-renderer,
yt-mealbar-promo-renderer,
ytd-statement-banner-renderer,
ytd-ad-slot-renderer,
ytd-in-feed-ad-layout-renderer,
ytd-banner-promo-renderer-background
statement-banner-style-type-compact,
.ytd-video-masthead-ad-v3-renderer,
div#root.style-scope.ytd-display-ad-renderer.yt-simple-endpoint,
div#sparkles-container.style-scope.ytd-promoted-sparkles-web-renderer,
div#main-container.style-scope.ytd-promoted-video-renderer,
div#player-ads.style-scope.ytd-watch-flexy,
ad-slot-renderer,
ytm-promoted-sparkles-web-renderer,
masthead-ad,
tp-yt-iron-overlay-backdrop,
#masthead-ad {
display: none !important;
}
`;
document.head.appendChild(style);
}
})();
Thank you so much, it works perfectly 🔥❤
i've made a simple script to skip all video ads since none of the adblockers/userscripts are working these days: Make sure that no other Ad skipping scripts are running simultaneously and that YouTube is whitelisted in your ad blocker.