Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
auto-continue for chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
Starcraft426 committed Dec 25, 2023
1 parent d8ada96 commit 26c74fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/chrome/js/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ document.addEventListener("DOMContentLoaded", event => {

// Skip through ads
if (cache['auto_skip_ads'] === true) {

// Click on "yes" button when showing "continue playing"
const popup = Array.from(document.querySelectorAll('.ytd-popup-container'))?.[1]
if (popup.style.cssText.split(" ").indexOf("display:") === -1){
Array.from(document.querySelectorAll('.yt-spec-button-shape-next--call-to-action'))?.forEach(e =>
{if (e.children[0].children[0].textContent === "Oui"){e.click();}})
}

// Close overlay ads.
Array.from(document.querySelectorAll('.ytp-ad-skip-button-modern'))?.forEach(e => e?.click());

Expand Down

0 comments on commit 26c74fc

Please sign in to comment.