Greasy Fork 支持简体中文。

CSDN Blog Super Simplification

move comment area to left side & remove login requirement, move body area to right side & auto trigger read more button, remove author panel,recommendation panel etc..., change the background to default style, hide login pop up panel

目前為 2020-11-09 提交的版本,檢視 最新版本

// ==UserScript==
// @name         CSDN Blog Super Simplification
// @name:zh-CN   CSDN Blog 极致简化
// @namespace    csdn_blog_super_simplification
// @version      1.6
// @description  move comment area to left side & remove login requirement, move body area to right side & auto trigger read more button, remove author panel,recommendation panel etc..., change the background to default style, hide login pop up panel
// @description:zh-CN  move comment area to left side & remove login requirement, move body area to right side & auto trigger read more button, remove author panel,recommendation panel etc..., change the background to default style, hide login pop up panel
// @author       Xavier Wong
// @run-at       document-start
// @include      https://blog.csdn.net/*
// @exclude      https://www.csdn.net/*
// @grant        GM_addStyle
// ==/UserScript==

GM_addStyle(
    // Background & Color
    'body{background-color:#f5f6f7 !important;background-image:none !important}' +
    // Layout Rearrangement
    '#rightAside,#btnMoreComment,#tip_comment,#quickComment,.hide-article-box,.csdn-side-toolbar,.recommend-box,.template-box,.footer-box,.blog-footer-bottom,aside{display:none !important}' +
    '.main_father{height: unset}' +
    '#mainBox,#article_content{width:100% !important;height:100% !important}' +
    'main{width:100% !important;height:100% !important;margin-bottom: unset !important}'+
    '.blog-content-box{width:70% !important;float:right;z-index:1;padding-bottom:48px !important}' +
    // Toolbox
    '.more-toolbox,.left-toolbox{width:100% !important;float:right;left:unset !important}' +
    // Comment Area
    '.comment-box{position:fixed;float:left;top:52px;width:28%}' +
    '.comment-list-box{overflow:scroll !important;max-height:calc(70vh) !important;margin-bottom:10px !important}' +
    '#commentPage{margin-bottom:25px !important;display:block !important}' +
    // Login Box
    '.login-box,.login-mark{visibility:hidden !important}'
);

function commentArea(toolbar, comment){
    if(toolbar.style.position !== comment.style.position){
        comment.style.position = toolbar.style.position;
    }
    if(comment.style.position === "fixed"){
        console.log(document.getElementsByTagName("main")[0].offsetWidth)
        if(document.getElementsByTagName("main")[0].offsetWidth*0.28 !== comment.offsetWidth){
            comment.style.width = document.getElementsByTagName("main")[0].offsetWidth*0.28 + "px";
        }
    }else{
        comment.style.width = "28%";
    }
}
(
    function() {
        window.onload = function(){
            'use strict';
            var toolbar = document.getElementById("csdn-toolbar");
            var main = document.getElementsByClassName("blog-content-box")[0];
            var comment = document.getElementsByClassName("comment-box")[0];
            main.parentNode.insertBefore(comment,main.nextSibling);
            comment.style.width = document.getElementsByTagName("main")[0].offsetWidth*0.28 + "px";
            window.onscroll = function(){
                commentArea(toolbar, comment)
            }
            window.onresize = function(){
                commentArea(toolbar, comment)
            }
        }
    }
)();