CSDN|简书优化

支持手机端和PC端

ของเมื่อวันที่ 28-06-2020 ดู เวอร์ชันล่าสุด

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         CSDN|简书优化
// @namespace    http://tampermonkey.net/
// @version      0.2.5
// @description  支持手机端和PC端
// @author       MT-戒酒的李白染
// @include        http*://www.csdn.net/*
// @include        http*://www.jianshu.com/*
// @include        http*://blog.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="";}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
        {//手机
            if(location.href.match(/csdn.net/g)){
                console.log("csdn");
                setTimeout(function(){
                    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){}
                },0)
            }else if(location.href.match(/jianshu.com/g)){
                console.log("简书");
                setTimeout(function(){
                    try{document.querySelector("#jianshu-header").remove()}catch(err){}
                    try{document.querySelector("#layout-default > div.main-view > button").remove()}catch(err){}
                    try{document.querySelector("#note-show > div.note > div.content > div > div.collapse-tips > button").click()}catch(err){}
                    try{document.querySelector("#layout-default > div.main-view > div.dialog-1f6iY_0 > div > div > div > div > button.cancel").click()}catch(err){}
                    try{document.querySelector("#note-show > div.note > div:nth-child(5)").remove()}catch(err){}
                    try{document.querySelector("#recommended-notes").remove()}catch(err){}
                    try{document.querySelector("#footer").remove()}catch(err){}
                },0)
            }
        }



})();