Skip to content

Commit

Permalink
fix: fix the class name of the video ad close button
Browse files Browse the repository at this point in the history
closes #9
  • Loading branch information
Gabriel Duarte committed May 31, 2018
1 parent a93b671 commit e426e9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/youtube-autoclose-ads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit e426e9f

Please sign in to comment.