From e426e9f7e7250f708e016c5d7686260b450f32b1 Mon Sep 17 00:00:00 2001 From: Gabriel Duarte Date: Thu, 31 May 2018 15:31:06 -0300 Subject: [PATCH] fix: fix the class name of the video ad close button closes #9 --- src/youtube-autoclose-ads.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(() => {