50 lines
2.6 KiB
JavaScript
50 lines
2.6 KiB
JavaScript
// ==UserScript==
|
|
// @name CSDN Cleaner
|
|
// @version 0.1.1
|
|
// @description try to take over the world!
|
|
|
|
// @author Newnius
|
|
// @namespace https://blog.newnius.com
|
|
// @homepageURL https://blog.newnius.com/
|
|
// @supportURL https://code.newnius.com/snippets/Tampermonkey
|
|
// @license Apache-2.0
|
|
// @icon https://blog.newnius.com/images/avatar.jpg
|
|
// @updateURL https://code.newnius.com/snippets/Tampermonkey/raw/branch/master/CSDN_Cleaner/CSDN_Cleaner.user.js
|
|
|
|
// @match https://blog.csdn.net/*
|
|
// @icon https://www.google.com/s2/favicons?domain=blog.csdn.net
|
|
// @grant GM_addStyle
|
|
// @run-at document-start
|
|
// ==/UserScript==
|
|
|
|
(function() {
|
|
'use strict';
|
|
|
|
// no sidebar
|
|
GM_addStyle('#asideHotArticle { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
GM_addStyle('#asideCategory { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
GM_addStyle('#asideNewComments { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
GM_addStyle('#asideArchive { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
GM_addStyle('#asideCustom { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
GM_addStyle('#asidedirectory { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
GM_addStyle('#mainBox > main { margin-right: 13% !important; width: 80% !important; }');
|
|
// no auther card aside
|
|
GM_addStyle('aside.blog_container_aside { visibility: hidden !important; width: 0px !important; height: 0px !important }');
|
|
// no recommendations
|
|
GM_addStyle('.recommend-tit-mod { visibility: hidden !important; height: 0px !important; position: fixed !important; }');
|
|
GM_addStyle('.recommend-box { visibility: hidden !important; height: 0px !important; position: fixed !important; }');
|
|
GM_addStyle('.template-box { visibility: hidden !important; height: 0px !important; position: fixed !important; }');
|
|
GM_addStyle('.blog-footer-bottom { visibility: hidden !important; height: 0px !important; position: fixed !important; }');
|
|
//
|
|
// no ads
|
|
GM_addStyle('#dmp_ad_58 { visibility: hidden !important; height: 0px !important; }');
|
|
//
|
|
// no fixed bottom tool bar
|
|
GM_addStyle('#toolBarBox > .left-toolbox { position: relative !important; left: 0px !important; }');
|
|
// no fixed header
|
|
GM_addStyle('#csdn-toolbar { position: relative !important; }');
|
|
//
|
|
// enable select
|
|
GM_addStyle('#content_views { user-select: unset !important }');
|
|
|
|
})(); |