Remove Youtube Adblock Warnings!

No more 'Ad blockers are not allowed on YouTube', 'ad blockers violate youtube's terms of service'

当前为 2023-10-16 提交的版本,查看 最新版本

  1. //New script available!
  2. //[BETA] Youtube NO preroll ads, Bypass new restrictions!
  3. //download: https://greasyfork.org/en/scripts/477464-beta-youtube-no-preroll-ads-bypass-new-restrictions
  4.  
  5.  
  6.  
  7. // ==UserScript==
  8. // @name Remove Youtube Adblock Warnings!
  9. // @namespace http://tampermonkey.net/
  10. // @version 0.2.1
  11. // @description No more 'Ad blockers are not allowed on YouTube', 'ad blockers violate youtube's terms of service'
  12. // @author coder369
  13. // @license MIT
  14. // @match https://www.youtube.com/*
  15. // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
  16. // @grant none
  17. // ==/UserScript==
  18.  
  19. //-Quick fixed, doesn't entirely remove the banner.
  20.  
  21.  
  22. (function() {
  23. 'use strict';
  24. var player = document.getElementById("movie_player");
  25. var closeit = setInterval(function() {
  26. if(document.getElementsByClassName("style-scope ytd-popup-container").length > 0 && document.getElementById("dismiss-button")&& document.getElementById("divider"))
  27. {
  28. document.getElementById("dismiss-button").click();
  29. setTimeout(function(){
  30. document.getElementsByClassName("ytp-play-button ytp-button")[0].click();
  31. console.log("banner closed");
  32. clearInterval(closeit);
  33. }, 4000);
  34. }
  35. }, 300);
  36. })();