Guest User

Untitled

a guest
Oct 31st, 2021
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Auto Skip YouTube Ads
  3. // @version 1.0.0
  4. // @description Speed up and skip YouTube ads automatically
  5. // @author jso8910
  6. // @match *://*.youtube.com/*
  7. // @exclude *://*.youtube.com/subscribe_embed?*
  8. // ==/UserScript==
  9. setInterval(() => {
  10. const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')
  11. if (btn) {
  12. btn.click()
  13. }
  14. const ad = [...document.querySelectorAll('.ad-showing')][0];
  15. if (ad) {
  16. document.querySelector('video').playbackRate = 10;
  17. }
  18. }, 50)
Advertisement
Add Comment
Please, Sign In to add comment