// ==UserScript== // @name 解除禁止复制和粘贴限制(全网页通用) // @namespace http://jiangning_sama/pojie_cpoy.net/ // @version 6.66.7 // @description 破解所有网站的禁止粘贴功能,没错,是所有网站,什么学习通什么pta啥的都统统破解!!使用方法:安装完毕后打开目标网页,就可以正常使用了。然后没了,有疑问或者反馈都可以发我邮箱啊:2697003697@qq.com // @author 江宁sama // @match *://*/* // 匹配所有网站 // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; setTimeout(() => { document.body.removeAttribute('onselectstart'); document.body.style.userSelect = 'auto'; document.documentElement.style.userSelect = 'auto'; document.querySelectorAll('input, textarea').forEach((el) => { el.removeAttribute('onpaste'); el.removeAttribute('oncopy'); el.removeAttribute('oncut'); el.onpaste = null; el.oncopy = null; el.oncut = null; }); const eventTypes = ['copy', 'cut', 'paste', 'contextmenu', 'selectstart']; eventTypes.forEach((eventType) => { document.addEventListener(eventType, (e) => e.stopPropagation(), true); }); console.log("已解除页面的禁止复制和粘贴限制"); }, 1000); })();