AC-CSDN自动阅读全文,优化

避免CSDN阅读文章需要点击按钮,非常的方便

目前为 2017-11-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         AC-CSDN自动阅读全文,优化
// @version      1.0
// @description  避免CSDN阅读文章需要点击按钮,非常的方便
// @author       AC
// @namespace    [email protected]
// @include      /http://blog.csdn.net/[^/]+/article/details/.*/
// @note         2017.11.1-V1.0 第一版,移除CSDN的点击阅读文章按钮
// @run-at       document-start
// ==/UserScript==
function AC_addStyle(css, className){
    var tout = setInterval(function(){
        if(document.body != null){
            clearInterval(tout);
            try{document.querySelector("."+className).remove();}catch (e){};
            var cssNode = document.createElement("style");
            if(className != null)
                cssNode.className = className;
            cssNode.innerHTML = css;
            try{document.body.appendChild(cssNode);}catch (e){console.log(e.message);}
        }
    }, 200);
}
if(location.host == "http://blog.csdn.net"){
    var actaobaoT = setInterval(function(){
        if(document.querySelector(".readall_box").style.display == ""){
            clearInterval(actaobaoT);
            AC_addStyle("#article_content{height:auto !important;}.readall_box{display:none !important;}");
        }
    }, 200);
}

QingJ © 2025

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