Greasy Fork

Greasy Fork is available in English.

清爽阅读CSDN网站内容

try to take over the world!

当前为 2018-04-16 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         清爽阅读CSDN网站内容
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://blog.csdn.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function delId(id){
       try{ document.getElementById(id).remove(); }catch(e){}
    }
    function css(id,styles){
       try{
         for(var style in styles){
           document.getElementById(id).style[style] =styles [style];
         }
       }catch(e){}

        try{
         for(var style2 in styles){
           document.getElementsByTagName(id)[0].style[style2] =styles[style2];
         }
       }catch(e){}

    }

    function delCss(css){
        try{ document.getElementsByClassName(css)[0].remove(); }catch(e){}
    }
    function delTag(tag){
       try{ document.getElementsByTagName(tag)[0].remove(); }catch(e){}
    }

    delId('side');delId('navigator');delId('article_ad');

    css('main',{
        paddingLeft : 0,
        width: '97%',
        float : 'left'
    });
    css('article_content',{height:'auto'});
    delCss('readall_box');
    delCss('article_next_prev');

    delTag('aside');

    setTimeout(function(){

        delId('share_box');
        delCss('meau-gotop-box');
        delCss('csdn-toolbar');
        delCss('recommend_list');
        delCss('comment_look_more');
        css('comment_list',{height:'auto'});

        delCss('pulllog-box');//讨厌的注册条
        delId('comments');//无用的注册条

    },1500);
    // Your code here...
})();