Skip to content

Instantly share code, notes, and snippets.

@fredsiika
Created May 22, 2019 10:33
Show Gist options
  • Save fredsiika/0a667d1ecaa9ee77c86dc8d8e48adaa5 to your computer and use it in GitHub Desktop.
Save fredsiika/0a667d1ecaa9ee77c86dc8d8e48adaa5 to your computer and use it in GitHub Desktop.
Paste into your console while watching YouTube video to automatically press "skip" button when ad appears.
// check for ad every second
setInterval(() => {
// cache skip button
const skipBtn = document.querySelector('.videoAdUiSkipButton');
// click skip button if it exists
if (skipBtn) skipBtn.click();
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment