CSDN优化

支持手机端和PC端

Versione datata 27/06/2020. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         CSDN优化
// @namespace    http://tampermonkey.net/
// @version      0.2.2
// @description  支持手机端和PC端
// @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{document.querySelector("#writeGuide").remove();}catch(err){}
            try{document.querySelector(".leftPop").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){}
            try{document.querySelector("body > main > a").remove();}catch(err){}
        }

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