Closed mvarendorff closed 4 months ago
You also need to update the selector that checks if an ad is playing:
https://github.com/squgeim/yt-ad-autoskipper/blob/master/src/utils/youtubeEvents.ts#L29
const adPlaying =
document
.querySelectorAll(".ytp-ad-module > div").length > 0;
Nice catch, thanks @nicholas-eden! Since adPlaying
is used to determine if the playing ad has changed, I tweaked the selector a bit to find something with an aria-label
that can be used to see if the ad has changed.
Thank you so much @geisterfurz007 @nicholas-eden!
We're not stopping with the variants! Looks like YouTube shuffled some selectors around. Unfortunately, the ID isn't stable, so can't use that but from what I have seen and played around with
button.ytp-skip-ad-button
appears to be unique.Should close #63 and potentially #67