禁止百度QJ我剪贴板!

禁止狗贼百度QJ我剪贴板!

// ==UserScript==
// @name         禁止百度QJ我剪贴板!
// @namespace    http://bmmmd.com/
// @version      0.4
// @description  禁止狗贼百度QJ我剪贴板!
// @author       bmm
// @match        https://*.baidu.com/*
// @license      MIT
// @grant        none
// ==/UserScript==

(function () {
    "use strict";

    const _writeText = window.navigator.clipboard.writeText;
    window.navigator.clipboard.writeText = function () {
        return "Fuck Robin Li";
    };

    const _execCommand = document.execCommand;
    document.execCommand = function () {
        if (arguments[0] == "copy") {
            return "Fuck Robin Li";
        }
        _execCommand.apply(this, arguments);
    };
    document.addEventListener("copy", (event) => {
        event.preventDefault();
    });
})();