Fuck CSDN

Fuck CSDN!

Stan na 05-12-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name                   Fuck CSDN
// @version                1.0
// @description          Fuck CSDN!
// @author                 流星暴雨
// @grant                   none
// @match                  http*://blog.csdn.net/*
// @match                  http*://bbs.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;//如为真则开启拓展功能 去除 联系方式/赚零钱/传资源

    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 (){};

            if(extension){
                $(".gitChat").remove();
                $("#asideFooter").remove();
            }
        });
        var timer1=setInterval(function (){
            if($(".right-item[id]").size()>0){
                clearInterval(timer1);
                setTimeout(function (){
                    $(".right-item[id]").remove();
                },50)
            }
        },10);
        window.setInterval_=setInterval;
        document.body.insertBefore_=document.body.insertBefore;
        var timer;
        var mysetInterval=function (fun,time){
            //console.log(fun+'');
            if((fun+'').match("check-adblock-time")){
                //$(".adblock").remove();
                //"function" == typeof window.csdn.insertcallbackBlock && window.csdn.insertcallbackBlock();
                /*timer=setInterval_(function (){
                if($(".check-adblock-bg").size()>0){
                    clearInterval(timer);
                    $(".check-adblock-bg").parent().remove();
                }
            },10);*/
                return null;
            }else{
                return setInterval_(fun,time);
            }
        }
        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;
        setInterval=mysetInterval;
    }else if(location.host.match("bbs")){
        $(function() {
            $(".post_body > div[scrolling=no]").remove();
            $(".bbs_feed_ad_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();
                    $(".post_body > div").remove();
                    $(".pulllog-box").remove();
                    $("#adContent").remove();
                }
            },10);
        });
    }

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