Auto Bypass YouTube Ads

Automatically bypass YouTube ads for uninterrupted video watching.

  1. // ==UserScript==
  2. // @name Auto Bypass YouTube Ads
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @license MIT
  6. // @description Automatically bypass YouTube ads for uninterrupted video watching.
  7. // @author joybarmon329620
  8. // @match https://www.youtube.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Function to remove YouTube video ads
  16. function bypassAds() {
  17. // Check if an ad is present
  18. var adElement = document.querySelector('.video-ads');
  19. if (adElement) {
  20. // Skip the ad by clicking on the skip button or video overlay
  21. var skipButton = document.querySelector('.ytp-ad-skip-button-container button');
  22. if (skipButton) {
  23. skipButton.click();
  24. } else {
  25. var overlay = document.querySelector('.ytp-ad-overlay-close-button');
  26. if (overlay) {
  27. overlay.click();
  28. }
  29. }
  30. }
  31. }
  32.  
  33. // Call bypassAds function every 5 seconds to check for ads
  34. setInterval(bypassAds, 5000);
  35. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址