webx32 / CSDN阅读全文自动展开

// ==UserScript==
// @namespace     https://openuserjs.org/users/webx32
// @name           CSDN阅读全文自动展开
// @description    CSDN阅读全文自动展开
// @copyright     2020, webx32 (https://openuserjs.org/users/webx32)
// @license       MIT
// @version       1.0.0
// @include       *://blog.csdn.net/*
// @require     https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js
// @grant none
// ==/UserScript==

// ==OpenUserJS==
// @author webx32
// ==/OpenUserJS==

$(function () {
  var count = 10;

  function expand() {
    var expanded = false;
    var $articlebox = $('.hide-article-box');
    if ($articlebox.length > 0) {
      expanded = true;
      $articlebox.remove();
      $('#article_content').removeAttr('style');
    }
    console.log("expand", expanded, count);
    if (!expanded && --count) {
      setTimeout(expand, 500);
    }
  }
  expand();
});