Skip to content

Commit

Permalink
fix: fix the classname of the close ad button
Browse files Browse the repository at this point in the history
Youtube changed the ads layout, so the class of the close button needs to get updated too

closes #8
  • Loading branch information
Gabriel Duarte committed May 27, 2018
1 parent 0898d33 commit a93b671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/youtube-autoclose-ads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ setInterval(() => {
videoAdWaitSeconds: 5,
},
({ normalAdWaitSeconds, videoAdWaitSeconds }) => {
const adClose: HTMLElement | null = document.querySelector(".adDisplay .close-padding")
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")

Expand Down

0 comments on commit a93b671

Please sign in to comment.