Skip to content

Instantly share code, notes, and snippets.

@jadeallencook
Last active January 17, 2019 20:19
Show Gist options
  • Save jadeallencook/54ffd4811e1b4ac790ffab8f89450271 to your computer and use it in GitHub Desktop.
Save jadeallencook/54ffd4811e1b4ac790ffab8f89450271 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