Elearning 通靈小工具

Elearning 解除考試跳出、複製限制

// ==UserScript==
// @name         Elearning 通靈小工具
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  Elearning 解除考試跳出、複製限制
// @author       Ryan Lee
// @match        https://elearning.yuntech.edu.tw/learn/exam/exam_start.php*
// @icon         https://elearning.yuntech.edu.tw/base/10001/door/tpl/icon.ico
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    console.log("開始執行!!!")
    Window.prototype._addEventListener = Window.prototype.addEventListener;
    Window.prototype.addEventListener = function (eventName, fn, options) {
        if (eventName === 'blur' || eventName === 'pagehide') {
            console.log(`已攔截${eventName}事件!`);
            return;
        }
        console.log(`Window ${eventName}事件!`);

        this._addEventListener(eventName, fn, options);
    };
    document.body.removeAttribute("ondragstart")
    document.body.removeAttribute("oncontextmenu")
    document.body.removeAttribute("onselectstart")
})();