CSDN

CSDN免登录复制

  1. // ==UserScript==
  2. // @name CSDN
  3. // @namespace https://zhenghaoqi.com
  4. // @version 1.0
  5. // @description CSDN免登录复制
  6. // @author 郑小柒~
  7. // @match https://blog.csdn.net/*/article/details/*
  8. // @icon https://g.csdnimg.cn/static/logo/favicon32.ico
  9. // @license AGPL - 3.0
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. //获取所有代码块
  16. let codes=document.querySelectorAll("code");
  17. //循环遍历所有代码块
  18. codes.forEach(c=>{
  19. //设置代码块可以编辑,从而实现复制
  20. c.contentEditable="true";
  21. });
  22. // Your code here...
  23. })();