AC-CSDN自动展开全文

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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         AC-CSDN自动展开全文
// @version      2.1
// @description  避免CSDN阅读文章需要点击按钮,非常的方便
// @author       AC
// @namespace    [email protected]
// @include      /https?://blog.csdn.net/[^/]+/article/details/.*/
// @note         2018.3.24-V2.1 修复在HTTPS上没有正确的调用的问题
// @note         2017.11.2-V2.0 修复在上次使用过程中HOST写错了的BUG
// @note         2017.11.1-V1.0 第一版,移除CSDN的点击阅读文章按钮
// @run-at       document-start
// ==/UserScript==
function addStyle(css) { //添加CSS的代码--copy的
    var pi = document.createProcessingInstruction(
        'xml-stylesheet',
        'type="text/css" href="data:text/css;utf-8,' + encodeURIComponent(css) + '"'
    );
    return document.insertBefore(pi, document.documentElement);
}
if(location.host == "blog.csdn.net"){
    var actaobaoT = setInterval(function(){
        if(document.querySelector(".readall_box").style.display == ""){
            clearInterval(actaobaoT);
            addStyle("#article_content{height:auto !important;}.readall_box{display:none !important;}");
        }
    }, 100);
}