Greasy Fork

关闭复制后缀

close_suffix_of_website_read

目前为 2024-02-05 提交的版本。查看 最新版本

// ==UserScript==
// @name         关闭复制后缀
// @namespace    http://tampermonkey.net/
// @version      0.3.1
// @description  close_suffix_of_website_read
// @author       You
// @match        https://*/*
// @match        http://*/*
// @license	 GPL-3.0
// @icon         none
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

   Object.defineProperty(Element.prototype, "oncopy", {
        value: 1,
        writable: true,
    })

    const oldEventListener = EventTarget.prototype.addEventListener

    EventTarget.prototype.addEventListener = function (type, listener, options) {
        if (type == "copy") {
        } else {
            return oldEventListener.call(this, type, listener, options);
        }
    }
})();