Greasy Fork

Greasy Fork is available in English.

破解超星作业和考试编辑器粘贴限制

破解超星作业和考试编辑器粘贴限制,基于https://github.com/zxf1023818103/enable-chaoxing-editor-paste修改而来。

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         破解超星作业和考试编辑器粘贴限制
// @namespace    http://tampermonkey.net/
// @version      1.3
// @author       fcwys
// @compatible   chrome
// @compatible   firefox
// @compatible   edge
// @compatible   safari
// @description  破解超星作业和考试编辑器粘贴限制,基于https://github.com/zxf1023818103/enable-chaoxing-editor-paste修改而来。
// @license      MIT
// @match        *://mooc1*.chaoxing.com/mooc-ans/work/doHomeWorkNew*
// @match        *://mooc1*.chaoxing.com/mooc-ans/mooc2/work/dowork*
// @match        *://mooc1*.chaoxing.com/exam-ans/exam/test/reVersionTestStartNew*
// @match        *://mooc1*.chaoxing.com/work/doHomeWorkNew*
// @match        *://mooc1*.chaoxing.com/exam/test/reVersionTestStartNew*
// @grant        auto
// ==/UserScript==

var isFuck=false;
function pasteOK(){
  for (var editorName in UE.instants) { UE.instants[editorName].__allListeners.beforepaste = null }
  isFuck=true;
}

(function() {
  /*定时器轮询解决新版考试界面无效问题*/
  var pTimer=setInterval(function(){
    isFuck||pasteOK();
    isFuck&&clearInterval(pTimer);
  }, 500)
})();