csdn暴力美化

去除所有与文章无关的信息

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         csdn暴力美化
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  去除所有与文章无关的信息
// @author       wanghaozhe
// @match        *://blog.csdn.net/*/article/details/*
// @match        *://*.blog.csdn.net/article/details/*
// @match        *://bbs.csdn.net/topics/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    var body = document.getElementsByTagName('body')[0]
    var style = document.createElement('style')
    var css = `
#articleSearchTip{
display: none !important;
}
.hljs-button{
display: none !important;
}
.passport-login-container{
display: none !important;
}
code,ol{
user-select: text !important;
}
#csdn-toolbar{
display: none !important;
}
.csdn-side-toolbar{
display: none !important;
}
.article-info-box{
display: none !important;
}
.left-toolbox{
display: none !important;
}
.column-group{
display: none !important;
}
#rightAside{
display: none !important;
}
.recommend-box{
display: none !important;
}
.template-box{
display: none !important;
}
.blog-footer-bottom{
display: none !important;
}
body{
background-color: black;
background-image: none;
}
.blog_container_aside{
display: none !important;
}
#mainBox{
width: 100%;
display: flex;
justify-content: center;
}
main{
width: 80%;
}
    `
    var innerStyle = document.createTextNode(css)
    style.appendChild(innerStyle)
    document.head.appendChild(style)
    // 禁止弹窗
    window.alert = function() {
        return false;
    }
})();