IT人员常用网站+谷歌浏览器广告

try to take over the world!

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         IT人员常用网站+谷歌浏览器广告
// @namespace    http://tampermonkey.net/
// @version      0.2.2
// @description  try to take over the world!
// @author       You
// @match        *://my.oschina.net/*
// @match        *://www.cnblogs.com/*
// @match        *://www.tampermonkey.net/*
// @match        *://www.csdn.net/*
// @match        *://blog.csdn.net/*/article/details/*
// @match        *://ent.sina.com.cn/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var cnblogs = /www.cnblogs.com/
    var oschina = /my.oschina.net/
    var tampermonkey = /www.tampermonkey.net/
    var csdn = /www.csdn.net/
    var sina = /ent.sina.com.cn/

    var currentURL = window.location.href;


    setTimeout(function () {
        if(oschina.test(currentURL)){
            $(".adsbygoogle").remove();

        }
        if(tampermonkey.test(currentURL)){
            $(".adventing").remove();

        }
        if(cnblogs.test(currentURL)){
            $("#div-gpt-ad-1539008685004-0").remove();//文章底部广告
            $("#cnblogs_c1").remove();
            $("#cnblogs_a1").remove();
            for(var i = 1 ; i<5;i++){
                $("#cnblogs_b"+i).remove();//首页右侧广告
            }
        }
        //CSDN主页
        if(csdn.test(currentURL)){
            console.log(1212121212)
            document.getElementsByClassName("banner-ad-box")[0].remove();
            document.getElementsByClassName("indexSuperise")[0].remove();//自定义首页右侧悬浮广告去除
            document.getElementsByClassName("slide-outer right_top")[0].remove();//首页右侧轮播广告
            document.getElementsByClassName("right_box magazine_box")[0].remove();//

        }
        //CSDN文章页面
        if(/blog.csdn.net/.test(currentURL)){
            console.log(111111)
            if (document.getElementById("btn-readmore")){
                document.getElementById("btn-readmore").click(); //CSDN文章自动展开
                localStorage.setItem("anonymousUserLimit", "");
            } //自动展开
            document.getElementsByClassName("csdn-tracking-statistics mb8 box-shadow")[0].remove(); //左上广告
            document.getElementById("asideFooter").remove();
            document.getElementById("adContent").remove();
            document.getElementsByClassName("p4course_target")[0].remove();
            document.getElementsByClassName("bdsharebuttonbox")[0].remove();
            document.getElementsByClassName("vip-caise")[0].remove();
            document.getElementsByClassName("fourth_column")[0].remove();
        }
        console.log("谷歌浏览器广告")
    }, 3000);
})();