diff --git a/CSDN_Cleaner/CSDN_Cleaner.user.js b/CSDN_Cleaner/CSDN_Cleaner.user.js new file mode 100644 index 0000000..1596df1 --- /dev/null +++ b/CSDN_Cleaner/CSDN_Cleaner.user.js @@ -0,0 +1,44 @@ +// ==UserScript== +// @name CSDN Cleaner +// @namespace http://tampermonkey.net/ +// @version 0.1 +// @description try to take over the world! +// @author You +// @match https://blog.csdn.net/* +// @icon https://www.google.com/s2/favicons?domain=blog.csdn.net +// @updateURL https://code.newnius.com/snippets/Tampermonkey/raw/branch/master/CSDN_Cleaner/CSDN_Cleaner.user.js +// @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 }'); + +})(); \ No newline at end of file