Fuck CSDN

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

目前為 2019-01-03 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name                   Fuck CSDN
// @version                1.3
// @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://greasyfork.org/scripts/374950
// @supportURL         https://greasyfork.org/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").size()>0){
                clearInterval(timer1);
                setTimeout(function (){
                    $(".right-item[class*='ads']").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();
                $(".footer_box").empty();
                $(".footer_box").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!")
})();