// ==UserScript== // @name 超星学习通考试解除禁止复制、禁止粘贴 // @namespace http://tampermonkey.net/ // @version 0.18 // @description 🔥超星学习通考试解除禁止复制、禁止粘贴🔥 // @author CHENL // @include *chaoxing.com/exam/* // @include *chaoxing.com/exam-ans/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; $(function() { setTimeout(()=>{ $("body").removeAttr("onselectstart"); $("html").css("user-select", "unset"); UE.EventBase.prototype.fireEvent = function() { return null }; }, 1000); if(window.location.href.includes("newMooc=true")){ $("
复制题目
").insertAfter($(".colorShallow")) }else{ $("
复制题目
").insertAfter($(".Cy_TItle").find("p")) } window.copyContentOld = function(event) { setTimeout(()=>{ var range = document.createRange(); var selection = window.getSelection(); selection.removeAllRanges(); range.selectNodeContents($(event.srcElement.parentNode).find("p")[0]); selection.addRange(range); document.execCommand('copy'); selection.removeAllRanges(); let tips = $("复制成功").appendTo($(event.srcElement.parentNode)); setTimeout(()=>{ tips.remove(); }, 1000) }, 1000) } window.copyContentNew = function(event) { setTimeout(()=>{ var range = document.createRange(); var selection = window.getSelection(); selection.removeAllRanges(); range.selectNodeContents($(event.srcElement.nextSibling)[0]); selection.addRange(range); document.execCommand('copy'); selection.removeAllRanges(); let tips = $("复制成功").insertAfter($(event.srcElement)); setTimeout(()=>{ tips.remove(); },1000) },1000) } }) })();