Remove Youtube Ads(Works)

Removes all ads including video ads

目前为 2017-05-03 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Remove Youtube Ads(Works)
  3. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.7
  6. // @description Removes all ads including video ads
  7. // @author Wrekt/Ethan
  8. // @match https://www.youtube.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. var advideo = "false";
  13.  
  14. (function() {
  15. $("#header").remove();
  16. })();
  17.  
  18.  
  19. (function(){
  20. if ($(".ad-showing")[0]){
  21. advideo = "true";
  22. } else {
  23. advideo = "false";
  24. }
  25. $("#watch7-sidebar-ads").remove();
  26. $(".video-ads").remove();
  27. $("#pyv-watch-related-dest-url").remove();
  28. if (advideo == "true") {
  29. $(".video-stream").attr("src", "");
  30. }
  31. setTimeout(arguments.callee, 1000);
  32. })(1000);