AC-CSDN自动展开全文

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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);
}