Remove Youtube Ads (Other two scripts do not work, this does)

Removes all ads including video ads/recomended ads/poster ads/mid video ads.

目前为 2017-02-09 提交的版本。查看 最新版本

// ==UserScript==
// @name         Remove Youtube Ads (Other two scripts do not work, this does)
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Removes all ads including video ads/recomended ads/poster ads/mid video ads.
// @author       Wrekt/Ethan
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==

var advideo = "false";

$("a").click(function(){
   location.reload();
 });

if ($(".ad-showing")[0]){
    advideo = "true";
} else {
    advideo = "false";
}

(function() {
    $("#header").remove();
})();

setTimeout(function removead() {
    $("#watch7-sidebar-ads").remove();
    
    if (advideo == "true") {
    $(".video-stream").attr("src", "");
    }
}, 500);

setTimeout(function removeads() {
    if (advideo == "true") {
    $(".video-stream").attr("src", "");
    }
}, 800);

setTimeout(function removeadss() {
    $(".video-ads").remove();
    $("#pyv-watch-related-dest-url").remove();
}, 6500);

QingJ © 2025

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