csdn-博客园-网页美化

csdn和博客园进行网页美化的一个脚本

目前为 2021-08-09 提交的版本。查看 最新版本

// ==UserScript==
// @name         csdn-博客园-网页美化
// @description  csdn和博客园进行网页美化的一个脚本
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       yaochao
// @match        https://blog.csdn.net/*
// @match        https://www.cnblogs.com/*
// @match        https://juejin.cn/post/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var $ = window.$ || $;
    var host = window.location.host;
    switch(host) {
        case 'blog.csdn.net':
            $('.adblock,aside,.recommend-box,.pulllog-box,.tool-box,.meau-gotop-box,#csdn-toolbar,.comment-box,.p4course_target,.right-item,.recommend-right,#dmp_ad_58,.fourth_column,.csdn-side-toolbar,#toolBarBox,#blogColumnPayAdvert').remove();
            $('main').css('float', 'unset').css('margin', 'auto').css('background', '#ccc').css('padding', '10px');
            $('body').css('background', '#eee');
            $('.article_content').removeAttr("style");
			$('#btn-readmore').parent().remove();
            break;
        case 'www.cnblogs.com':
            $('#header,#footer,#sideBar,#comment_form').remove();
            $('#mainContent').css('background', '#ccc').css('padding', '10px');
            break;
        case 'juejin.cn':
            $('.main-header-box').remove();
            break;
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址