反CSDN

用于个人学习使用,暂时实现功能:无需关注即可阅读

As of 2022-10-14. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         反CSDN
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  用于个人学习使用,暂时实现功能:无需关注即可阅读
// @author       Li Sipeng
// @match        https://blog.csdn.net/*
// @grant        none
// @license      MIT
// ==/UserScript==


(function() {
    'use strict';
    let btnNode = document.querySelector("#mainBox > main > div.hide-article-box.hide-article-pos.text-center");
    if(btnNode==null) return;
    btnNode.innerHTML = "<p class='btn'>不关注也可以阅读哦>>></p>";
    btnNode.style = " color: red;font-size: 25px;"
    btnNode.addEventListener('click',()=>{
        console.log("反CSDN,你我有责");
        document.querySelector('#article_content').style.height='auto';
        document.querySelector("#mainBox > main > div.hide-article-box.hide-article-pos.text-center").style.display='none';
        // void(0);
    })

})();