Greasy Fork

Greasy Fork is available in English.

CSDN取消"关注博主才可阅读全文"限制

绕过CSDN"关注博主即可阅读全文"

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         CSDN取消"关注博主才可阅读全文"限制
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  绕过CSDN"关注博主即可阅读全文"
// @author       smartfish
// @match         *://*.csdn.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
     let t = setInterval(function () {
    //设定循环定时器,1000毫秒=1秒,1秒钟检查一次目标对象是否出现
    let articleContent = document.querySelector('#article_content'); //声明要查询的对象
    let hideAarticleBox = document.getElementsByClassName('hide-article-box')[0]
    console.log("will check the articleContent----",articleContent)
    console.log("will check the hideAarticleBox----",hideAarticleBox)
    if (articleContent && hideAarticleBox) {
       console.log("will change the style----")
      //判断对象是否存在,存在则开始设置值
       articleContent.style.height = 'auto'
       articleContent.style.overflow = 'hidden'
       hideAarticleBox.style.display = 'none'
       clearInterval(t); //清除循环定时器
    }

  }, 1000);
    // Your code here...


})();