diff --git a/src/youtube-autoclose-ads.ts b/src/youtube-autoclose-ads.ts index c1fc845..f835ca0 100644 --- a/src/youtube-autoclose-ads.ts +++ b/src/youtube-autoclose-ads.ts @@ -9,8 +9,8 @@ setInterval(() => { }, ({ normalAdWaitSeconds, videoAdWaitSeconds }) => { const adClose: HTMLElement | null = document.querySelector(".video-ads .ytp-ad-overlay-close-button") - const videoAdClose: HTMLElement | null = document.querySelector(".videoAdUiSkipButton") - const videoAdDisplayed: boolean = !!document.querySelector(".videoAdUiPreSkipButton") + const videoAdClose: HTMLElement | null = document.querySelector('.video-ads .ytp-button') + const videoAdDisplayed: boolean = !!document.querySelector(".ytp-ad-player-overlay-skip-or-preview") if (adClose && !adFound) { setTimeout(() => {