CSDN优化

电脑端:去除复制劫持;去除页面左边一竖栏留内容及下面部分;去除推荐文章的CSDN学院;自动展开全部

Verze ze dne 27. 06. 2020. Zobrazit nejnovější verzi.

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

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

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         CSDN优化
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  电脑端:去除复制劫持;去除页面左边一竖栏留内容及下面部分;去除推荐文章的CSDN学院;自动展开全部
// @description  手机端:去除点赞评论横栏,;自动展开全部;去除app内阅读提示按钮
// @author       MT-戒酒的李白染
// @match        *.csdn.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var usa = navigator.userAgent.match('Windows');
    if(usa != null)
        {//电脑
            try{localStorage.setItem("anonymousUserLimit", "");}catch(err){};
            try{csdn.copyright.textData=null;}catch(err){};
            try{document.querySelector("#mainBox > aside").remove();document.querySelector("#mainBox > main").style="width:1300px;";}catch(err){};
            try{document.querySelector("#btn-readmore-zk").click();}catch(err){};
            try{document.querySelector("body > div.login-mark").style="display:none";}catch(err){};
            try{document.querySelector("#passportbox").style=("display:none");}catch(err){};
            try{document.querySelector("#dmp_ad_58").remove();}catch(err){};
            try{var a = document.getElementsByClassName("recommend-item-box recommend-recommend-box");var i = 0;for(i=0;i<a.length;i++){a[i].remove();}}catch(err){};
            try{var b = document.getElementsByClassName("recommend-item-box recommend-recommend-box");var j = 0;for(i=0;i<a.length;i++){a[i].remove();}}catch(err){};
        }else{
            //手机
            try{document.querySelector("#article > div.readall_box > div.btn_mod > a > span").click();}catch(err){};
            try{document.querySelector("#new_read_more").click();}catch(err){};
            try{document.querySelector("body > span").remove();}catch(err){};
            try{document.querySelector("#operate").remove();}catch(err){};

        }

    // Your code here...
})();