copyright

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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()
  // }
})();