Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Update Youtube-Ad-blocker-Reminder-Remover.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealJoelmatic authored Jan 1, 2024
1 parent b4b9bb3 commit caf13d1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Youtube-Ad-blocker-Reminder-Remover.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Remove Adblock Thing
// @namespace http://tampermonkey.net/
// @version 2.8
// @version 2.9
// @description Removes Adblock Thing
// @author JoelMatic
// @match https://www.youtube.com/*
Expand Down Expand Up @@ -162,7 +162,6 @@
const blockAdButton = document.querySelector('[label="Block ad"]');
const blockAdButtonConfirm = document.querySelector('.Eddif [label="CONTINUE"] button');
const closeAdCenterButton = document.querySelector('.zBmRhe-Bz112c');
const adCenterDialog = document.querySelector('yt-about-this-ad-renderer');

if (video) video.playbackRate = 10;
if (video) video.volume = 0;
Expand All @@ -181,7 +180,6 @@
blockAdButtonConfirm?.click();
closeAdCenterButton?.click();

if (adCenterDialog) adCenterDialog.style.display = 'none';
if (popupContainer) popupContainer.style.display = "block";

if (debugMessages) console.log("Remove Adblock Thing: skipped Ad (✔️)");
Expand All @@ -197,7 +195,7 @@

const sponsor = document.querySelectorAll("div#player-ads.style-scope.ytd-watch-flexy, div#panels.style-scope.ytd-watch-flexy");
const style = document.createElement('style');

style.textContent = `
ytd-action-companion-ad-renderer,
div#root.style-scope.ytd-display-ad-renderer.yt-simple-endpoint,
Expand All @@ -206,6 +204,8 @@
ytd-in-feed-ad-layout-renderer,
.ytd-video-masthead-ad-v3-renderer,
div#player-ads.style-scope.ytd-watch-flexy,
yt-about-this-ad-renderer,
yt-mealbar-promo-renderer,
#masthead-ad {
display: none !important;
Expand Down Expand Up @@ -246,6 +246,10 @@

function checkForUpdate(){

if (!(window.location.href.includes("youtube.com"))){
return;
}

if (hasIgnoredUpdate){
return;
}
Expand Down

0 comments on commit caf13d1

Please sign in to comment.