Last active
October 27, 2024 02:18
-
-
Save David256/add61ae91d00a63bcb9e74f3a9ae62fe to your computer and use it in GitHub Desktop.
Script skips ads automatic in YouTube
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Ad Skip Script - Javascript | |
| */ | |
| /** | |
| * Ad Skip Script - Javascript | |
| */ | |
| window.adSkipper = setInterval(() => { | |
| const btn = document.querySelector('.ytp-skip-ad-button') | |
| const video = document.querySelector('video') | |
| if (!!btn) { | |
| btn.click() | |
| video.currentTime = video.duration | |
| } | |
| if (!!document.querySelector('.ytp-preview-ad__text')) { | |
| video.currentTime = video.duration | |
| } | |
| if (!!document.querySelector('[aria-label="Patrocinado"]')) { | |
| video.currentTime = video.duration | |
| } | |
| }, 1500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment