CSDN启用代码复制

Make CSDN code pre selectable.

Mint 2022.01.25.. Lásd a legutóbbi verzió

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 or Violentmonkey 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  Make CSDN code pre selectable.
// @author       You
// @match        *://blog.csdn.net/*/article/details/*
// @match        *://*.blog.csdn.net/article/details/*
// @match        *://bbs.csdn.net/topics/*
// @match        *://*.iteye.com/blog/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @require     https://cdn.bootcss.com/jquery/2.1.2/jquery.min.js
// @grant        none
// @license MIT
// ==/UserScript==
 
(function() {
    'use strict';
    setTimeout(function () {
        $("#content_views pre").css("user-select", "text");
        $("#content_views pre code").css("user-select", "text");
        console.log('hello');
    }, 100);
})();