Skip to content

Instantly share code, notes, and snippets.

@FazioNico
Last active September 12, 2020 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FazioNico/cd0413769e71ace66c67ae902e3289fc to your computer and use it in GitHub Desktop.
Save FazioNico/cd0413769e71ace66c67ae902e3289fc to your computer and use it in GitHub Desktop.
const ytadkiller = () => {
if (window['yt-add-skiper-init'])
window['yt-add-skiper-init'].clearInterval();
// init counter
window['yt-add-skiper-count'] = 0;
// init
window['yt-add-skiper-init'] = setInterval(_=> {
const el = document.querySelector('.ytp-ad-skip-button.ytp-button');
if (!el) return;
// count
++window['yt-add-skiper-count'];
// skip add
el.click();
}, 1000);
}
ytadkiller();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment