您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
使用ctrl+f1 开启功能
当前为
// ==UserScript== // @name 网大复制切屏取消 // @namespace http://www.myctu.cn/ // @version 0.2 // @description 使用ctrl+f1 开启功能 // @author fzguolg // @time 2021/10/14 15:38 // @match *://*/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant GM_setClipboard // ==/UserScript== (function() { 'use strict'; function hotkey() { var a = window.event.keyCode; //ctrl+f1 if ((a == 112) && (event.ctrlKey)) { if(confirm('是否开启复制,关闭切屏!!')){ document.onkeydown = setClipboard; //设置ctrl+c监听 //window.onblur = document.onblur = document.body.onblur = onblur = null; //解除切屏限制 window.onmouseleave = window.onblur = window.onmouseout = document.onmouseleave = document.onblur = document.onmouseout = document.body.onmouseleave = document.body.onblur = document.body.onmouseout = onmouseleave = onblur = onmouseout = null; //解除选中文本限制(这里html看具体考试页面绑定的限制事件dom而定) window.onselectstart = document.onselectstart = document.body.onselectstart = onselectstart = document.querySelector("html").onselectstart = null; //解除复制粘贴限制 window.oncopy = window.onpaste = document.oncopy = document.onpaste = document.body.oncopy = document.body.onpaste = oncopy = onpaste = null; //解除右键菜单限制(这里html看具体考试页面绑定的限制事件dom而定) window.oncontextmenu = document.oncontextmenu = document.body.oncontextmenu = oncontextmenu = document.querySelector("html").oncontextmenu = null; //解除快捷键操作屏蔽 window.onkeyup = window.onkeydown = window.onKeyPress = document.onkeyup = document.onkeydown = document.onKeyPress = document.body.onkeyup = document.body.onkeydown = document.body.onKeyPress = onkeyup = onkeydown = onKeyPress = null; console.log('开启复制功能,取消切屏'); } } } // 复制到剪贴板 function setClipboard(){ var a = window.event.keyCode; //ctrl+c if ((a == 67) && (event.ctrlKey) ) { var text_obj = window.getSelection(); var text = text_obj.toString(); GM_setClipboard(text); } } document.onkeydown = hotkey; //当onkeydown 事件发生时调用hotkey函数 console.log("启用网大破解脚本.快捷键 crlt+f1"); // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址