info纯净阅读

去除页面上无关内容,只为阅读!

// ==UserScript==
// @name         info纯净阅读
// @namespace    http://jianpage.com/
// @version      0.1
// @description  去除页面上无关内容,只为阅读!
// @author       ixx
// @match        *://www.infoq.cn/article/*
// @match        *://www.infoq.cn/news/*
// @icon         https://www.google.com/s2/favicons?domain=infoq.cn
// @require      https://code.jquery.com/jquery-1.12.4.min.js
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    var sh;
    $(document).ready(function(){
        sh=setInterval(show,1000);
    })
    function show(){
        if($(".live-fixed-bar").html()){
            $("#layout").css("background", "#e5f3ed");
            $(".inner-content").css("padding-top","0");
            $(".sidebar-artilce").remove();
            $(".live-fixed-bar").remove();
            $(".widget-operation").remove();
            $(".header").remove();
            $(".sub-nav-wrap").remove();
            $(".aside-wrap").remove();
            $(".slot-extra").remove();
            $(".layout-footer-wrap").remove();
            $(".article-widget-foot").remove();
            clearInterval(sh);
        }
    }
})();