基于TamperMonkey自动让CSDN文章自动展开的方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/rosefun96/article/details/85854876

背景

有的文章过长,CSDN会默认折叠起来,但我比较喜欢文章自动展开的状态。

方法

TamperMonkey新建脚本,输入:

// ==UserScript==
// @name         CSDN
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  CSDN 博客解除阅读更多限制
// @author       You
// @match        https://blog.csdn.net/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';
    var articleBox = $("div.article_content");
    articleBox.removeAttr("style");
    $("#btn-readmore").parent().remove();
})();

reference:
1CSDN 自动展开

猜你喜欢

转载自blog.csdn.net/rosefun96/article/details/85854876