脚本之家去广告

脚本之家去广告.

// ==UserScript==
// @name         脚本之家去广告
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  脚本之家去广告.
// @author       lidonghui
// @match        *://www.jb51.net/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';
    // 去头部logo旁边的广告
    function clearAD() {
        $(".logom").hide();
        $(".logor").hide();
        $(".mainlr").hide();
        $(".blank5").hide();
        $("#txtlink").hide();
        $(".topimg").hide();
        $(".main-right").hide();
        $("#con_all").hide();
        $("#main .main-left").css("width", "100%");

        $("iframe").map(function () {
            $(this).hide();
        });

        $(".google-auto-placed").map(function () {
            $(this).hide();
        });
    }

    // 启动定时器
    setInterval(function () {
        clearAD();
    }, 1000);

})();