Skip to content

Commit

Permalink
new button
Browse files Browse the repository at this point in the history
  • Loading branch information
erkamguresen committed Jan 31, 2024
1 parent 65ba1cc commit 83728f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h6 class="card-title">What is a Bookmarklet?</h6>
const skipAdsButton = document.querySelector('.ytp-ad-skip-button-modern');
const smallAdsButton = document.querySelector('.ytp-ad-overlay-close-button');
const noSkipAdsButton = document.querySelector('.ytp-ad-preview-slot');
const skipButtonText = document.querySelector('.ytp-ad-skip-button-text');
if (skipAdsButton) {
video.playbackRate = video.playbackRate != 1 ? 1 : 15;
Expand All @@ -81,6 +82,14 @@ <h6 class="card-title">What is a Bookmarklet?</h6>
} else if (noSkipAdsButton) {
video.playbackRate = video.playbackRate != 1 ? 1 : 15;
console.log('add played fast');
} else if (skipButtonText) {
video.playbackRate = video.playbackRate != 1 ? 1 : 15;
setTimeout(() => {
console.log('add skipped');
}, 50);
skipButtonText.click();
}
}
Expand Down

0 comments on commit 83728f3

Please sign in to comment.