csdn 油猴 去除登录后才能复制,去除复制版权文字

发布时间 2023-12-09 00:11:05作者: laremehpe
// ==UserScript==
// @name         csdn
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        *blog.csdn.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=csdn.net
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const $style = document.createElement('style');
    $style.type = 'text/css';
    $style.textContent = `.passport-login-container{display:none !important;} *{ user-select: text !important;} `;
    document.head.appendChild($style);
    window.addEventListener('load',()=>{
        $("#content_views").unbind("copy")
    })
})();

 若onload的事件迟迟不加载可以考虑换成setTimeout:

setTimeout(()=>{
        $("#content_views").unbind("copy")
},
2000)