Greasy Fork is available in English.

CSDN免登陆复制

免登陆复制

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      1.0
// @description  免登陆复制
// @author       Nhenk
// @match        https://blog.csdn.net/*/article/details/*
// @icon         https://g.csdnimg.cn/static/logo/favicon32.ico
// @license MIT
// @grant        none
// ==/UserScript==


(function() {
    'use strict';

    // 获取所有的代码块
    let codes = document.querySelectorAll('code');
    // 循环遍历所有代码块
    codes.forEach(c => {
        // 设置代码块可以编辑,从而实现复制
        c.contentEditable = "true";
    })
})();