Created
April 15, 2023 06:36
-
-
Save Steve-xmh/b6be0405f35082b3f562ef17ec367792 to your computer and use it in GitHub Desktop.
PTA 强制解除粘贴限制 用户脚本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name PTA 强制解除粘贴限制 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 用来线下输入然后线上直接粘贴提交,该敲的代码还是得敲 | |
// @author SteveXMH | |
// @match https://pintia.cn/problem-sets/*/exam/problems/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=pintia.cn | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
const original = EventTarget.prototype.addEventListener; | |
EventTarget.prototype.addEventListener = function (type, listener) { | |
if (type === "input" && listener.toString().includes("粘贴")) { | |
return; | |
} | |
original.call(this, type, listener); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment