Greasy Fork

来自缓存

Greasy Fork is available in English.

博客园纯净版

try to take over the world!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         博客园纯净版
// @namespace    http://tampermonkey.net/
// @version      1.5
// @description  try to take over the world!
// @author       bage22 liangys1115
// @include    *.cnblogs.com/*
// @lastmodified  2020-11-23
// @note    2020-11-20-V1.5 更新协议
// @note    2020-11-20-V1.4 隐藏博客园首页广告
// @note    2020-11-20-V1.3 动态获取左边距值并设置为右边距
// @note    2020-11-20-V1.2 设置主页面右边距与左边距保持一致
// @note    2020-11-20-V1.1 修改授权
// @note    2020-11-20-V1.0 移除更多无关的div中class内容
// @license    GPL-3.0-only
// ==/UserScript==

(function() {
    'use strict';
    function removeByID(){
        let len = arguments.length;
        for(var i=0;i<len;i++){
            $(arguments[i]).remove();
        }
    }

    function removeDivChild(){
        let len = arguments.length;
        for(var i=0;i<len;i++){
            $("div").remove(arguments[i]);
        }
    }

    function setContentRightMargin(){
        $("#mainContent .forFlow").css("margin-right",$("#mainContent .forFlow").css("margin-left"));
        $("#content").css("margin-right",$("#content").css("margin-left"));
    }

    removeByID("#cnblogs_c2","#comment_form","#cnblogs_c1","#sideBarMain","#blog_post_info_block", "#leftcontentcontainer",
               "#header", "#blog-comments-placeholder", "#mytopmenu", "#bannerbar", "#leftcontent", "#MySignature", "#side_right");
    removeDivChild(".bannerbar", ".orpc", ".footer", ".postDesc");
    setContentRightMargin();
})();