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

Commit

Permalink
Merge pull request #80 from ClientNode/rm/removeSponsor
Browse files Browse the repository at this point in the history
remove sponsor elements
  • Loading branch information
TheRealJoelmatic authored Oct 22, 2023
2 parents cad8edb + 41ed0e5 commit 0252fc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Youtube-Ad-blocker-Reminder-Remover.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
const mainContainer = document.querySelector('div#main-container.style-scope.ytd-promoted-video-renderer');
const feedAd = document.querySelector('ytd-in-feed-ad-layout-renderer');
const mastheadAd = document.querySelector('.ytd-video-masthead-ad-v3-renderer');
const sponsor = document.querySelectorAll("div#player-ads.style-scope.ytd-watch-flexy, div#panels.style-scope.ytd-watch-flexy");

if (ad)
{
Expand All @@ -161,6 +162,7 @@
mainContainer?.remove();
feedAd?.remove();
mastheadAd?.remove();
sponsor?.forEach(element => element.remove());
}, 50)
}
// Unpause the video Works most of the time
Expand Down

0 comments on commit 0252fc3

Please sign in to comment.