fuck-csdn

(2023-05-17 更新) 去你妈的老子要复制粘贴

  1. // ==UserScript==
  2. // @name fuck-csdn
  3. // @namespace https://blog.csdn.net/
  4. // @version 0.3
  5. // @description (2023-05-17 更新) 去你妈的老子要复制粘贴
  6. // @author clarkqwq
  7. // @match https://blog.csdn.net/*
  8. // @grant none
  9. // @license MIT
  10. // @supportURL https://github.com/ClarkQAQ/fuck-csdn
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. ["pre", "code"].forEach((name) => document.querySelectorAll(name).forEach((item) => item.setAttribute("style", "webkit-user-select: auto;user-select: auto;")));
  17. document.querySelectorAll("article")?.forEach((item) => (item.innerHTML = item.innerHTML));
  18. document.addEventListener("copy", (e) => (e.preventDefault() || e.clipboardData.setData("text/plain", window.getSelection().toString())));
  19. })();