copyright

修改为仅仅去除所有网站复制带来的小尾巴数据、破解复制权限

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         copyright
// @namespace    http://tampermonkey.net/
// @version      2.3
// @description  修改为仅仅去除所有网站复制带来的小尾巴数据、破解复制权限
// @author       You
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';

  [].slice.call(document.getElementsByTagName('*')).forEach((ele) => {
    ele.addEventListener("copy", function (t) {
      t.clipboardData.setData("text", getMySelection())
      t.preventDefault()
    })
  })

  function getMySelection() {
    let e = window.getSelection().getRangeAt(0).cloneContents().textContent
    return e
  }
  // M.copyright.config = {}
  // csdn.copyright.init($("article")[0], '', '');
  // let host = window.location.host
  // if (host === 'blog.csdn.net') {
  //  document.getElementById('btn-readmore').click()
  // }
})();