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

Update Youtube-Ad-blocker-Reminder-Remover.user.js #191

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Youtube-Ad-blocker-Reminder-Remover.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
{
setInterval(() =>{
const ad = [...document.querySelectorAll('.ad-showing')][0];

const popupAd = document.querySelector("style-scope, .yt-about-this-ad-renderer");
const skipBtn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button');
const sidAd = document.querySelector('ytd-action-companion-ad-renderer');
const displayAd = document.querySelector('div#root.style-scope.ytd-display-ad-renderer.yt-simple-endpoint');
Expand All @@ -128,6 +128,10 @@
const nonVid = document.querySelector(".ytp-ad-skip-button-modern");
const youtubepremium = document.getElementById('masthead-ad');

if(popupAd){
popupAd.parentElement.parentElement.remove();
console.log("Remove Adblock Thing: Popup Ad Center removed!");
}

if (ad)
{
Expand Down