Fuck CSDN

去除CSDN BBS&BLOG&DOWNLOAD&WWW ADP检测/广告/展开全文限制/复制小尾巴/其它

Verze ze dne 14. 12. 2018. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name                   Fuck CSDN
// @version                1.2
// @description          去除CSDN BBS&BLOG&DOWNLOAD&WWW ADP检测/广告/展开全文限制/复制小尾巴/其它
// @author                 流星暴雨
// @grant                   none
// @match                  http*://blog.csdn.net/*
// @match                  http*://bbs.csdn.net/*
// @match                  http*://download.csdn.net/*
// @match                  http*://www.csdn.net/*
// @run-at                  document-body
// @homepageURL    https://greatest.deepsurf.us/scripts/374950
// @supportURL         https://greatest.deepsurf.us/scripts/374950
// @namespace Eternal
// ==/UserScript==

(function() {
    'use strict';
    var extension = true;//如为真则开启拓展功能 去除 联系方式/赚零钱/传资源

    var hook=function(){
        window.setInterval_=setInterval;
        var mysetInterval=function (fun,time){
            //console.log(fun+'');
            if((fun+'').match("check-adblock-time")){
                return null;
            }else{
                return setInterval_(fun,time);
            }
        }
        setInterval=mysetInterval;
        document.body.insertBefore_=document.body.insertBefore;
        var myinsertBefore=function (ele,box){
            //console.log(ele.innerHTML);
            if(ele.innerHTML.match("ADP")||ele.innerHTML.match("广告")){
                return document.body;
            }else{
                return document.body.insertBefore_(ele,box);
            }
        };
        document.body.insertBefore=myinsertBefore;
    }

    if(location.host.match("blog")){
        $(function() {
            $("#article_content").css("height",'');
            $(".hide-article-box").remove();
            $(".fourth_column").remove();
            $(".pulllog-box").remove();
            $(".box-shadow").remove();
            $(".aside-box > div[data-track-click]").parent().remove();
            $(".BAIDU_DUP_fp_wrapper").remove();
            $(".adsbygoogle").parent().remove();
            $("#commentBox").prev().remove();
            $(".recommend-ad-box").remove();
            $("#adContent").remove();
            $("div[id*='kp_box']").remove();

            csdn.copyright.init=function (){};

            $("img[onerror]").remove();

            if(extension){
                $(".gitChat").remove();
                $(".persion_article").remove();
            }
        });
        var timer1=setInterval(function (){
            if($(".right-item[id]").size()>0){
                clearInterval(timer1);
                setTimeout(function (){
                    $(".right-item[id]").remove();
                },50)
            }
        },10);

        hook();
    }else if(location.host.match("bbs")){
        $(function() {
            $(".post_body > div[scrolling=no]").remove();
            $(".bbs_feed_ad_box").remove();
            $(".post_body > div").remove();
            $(".pulllog-box").remove();
            $("#adContent").remove();
            $("div[id*='kp_box']").remove();

            if(extension){
                $(".gitChat").remove();
                $(".persion_article").empty();
                $(".persion_article").css("visibility","hidden");
            }

            var timer2=setInterval(function (){
                if($(".hide_topic_box").size()>0){
                    clearInterval(timer2);
                    $("#bbs_detail_wrap").css("max-height",'');
                    $(".hide_topic_box").remove();
                }
            },10);
        });
    }else if(location.host.match("download")){
        $(".check-adblock-bg").parent().remove();

        $(function() {
            $(".dl_mar").remove();
            $(".right_bottom").remove();
            $(".hot_arti_list > div").remove();
            $("#adContent").remove();
            $("#album_detail_wrap > div:not(.dl_more)").remove();
            $(".dl_edu").remove();
            $("div[id*='kp_box']").remove();

            if(extension){
                $(".gitChat").remove();
                $(".fixed_dl").remove();
            }
        });

        hook();

        var timer3=setInterval(function (){
            if(document.body.insertBefore_==undefined){
                clearInterval(timer3);
                document.body.insertBefore_=document.body.insertBefore;
                var myinsertBefore=function (ele,box){
                    //console.log(ele.innerHTML);
                    if(ele.innerHTML.match("ADP")||ele.innerHTML.match("广告")){
                        return document.body;
                    }else{
                        return document.body.insertBefore_(ele,box);
                    }
                };
                document.body.insertBefore=myinsertBefore;
            }
        },10);

    }else if(location.host.match("www")){
        $(function() {
            $(".banner-ad-box").remove();
            $(".slide-outer").remove();
            $(".indexSuperise").remove();
            $("div[id*='kp_box']").remove();

            var timer4=setInterval(function (){
                if($("#adContent").size()>0){
                    clearInterval(timer4);
                    $("#adContent").remove();
                }
            },10);

            if(extension){
                $(".gitChat").remove();
                $(".persion_article").remove();
            }
        });
    }

    console.log("Fuck CSDN!")
})();