Last active
July 3, 2021 02:38
-
-
Save David256/add61ae91d00a63bcb9e74f3a9ae62fe to your computer and use it in GitHub Desktop.
Script skips ads automatic in YouTube
This file contains 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 | |
*/ | |
let d = document; | |
let t = 1000; | |
let e = document.createEvent("HTMLEvents"); | |
e.initEvent("click", true, true); | |
let fad = () => { | |
let b = d.querySelector(".ytp-ad-skip-button.ytp-button"); | |
let x = d.querySelector(".ytp-ad-overlay-close-container"); | |
t = 1000; | |
if (b) b.dispatchEvent(e); | |
else if (x) x.dispatchEvent(e); | |
else t = 100; | |
setTimeout(fad, t); | |
} | |
setTimeout(fad, t); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment