// ==UserScript== // @name 【万能】全平台自动答题脚本 // @version 4.3.9 // @namespace 自动答题 // @description 支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【继续教育类】【小鹅通】【安徽继续教育】【人卫慕课】【国开系列(四川)】【国地质大学远程与继续教育学院】等平台的测验考试,内置题库,自动答题功能全聚合。 // @author 万能 // @match *://*/* // @compatible chrome firefox edge // @grant GM_info // @grant unsafeWindow // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @grant GM_addStyle // @grant GM_registerMenuCommand // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_getResourceURL // @run-at document-end // @connect yuketang.cn // @connect ykt.io // @connect localhost // @connect app.itihey.com // @connect appwk.baidu.com // @resource Vue http://lib.baomitu.com/vue/2.6.0/vue.min.js // @resource Img https://lyck6.cn/img/6.png // @resource ElementUi http://lib.baomitu.com/element-ui/2.15.9/index.js // @resource ElementUiCss https://lib.baomitu.com/element-ui/2.15.9/theme-chalk/index.min.css // @resource Table https://www.forestpolice.org/ttf/2.0/table.json // @require https://cdn.jsdelivr.net/gh/photopea/Typr.js@15aa12ffa6cf39e8788562ea4af65b42317375fb/src/Typr.min.js // @require https://cdn.jsdelivr.net/gh/photopea/Typr.js@f4fcdeb8014edc75ab7296bd85ac9cde8cb30489/src/Typr.U.min.js // @require https://cdn.jsdelivr.net/npm/jquery@2.2.3/dist/jquery.min.js // @require https://cdn.jsdelivr.net/npm/jquery.md5@1.0.2/index.min.js // @require https://lib.baomitu.com/axios/0.27.2/axios.min.js // @require https://cdn.jsdelivr.net/gh/zyufstudio/jQuery@3a09ff54b33fc2ae489b5083174698b3fa83f4a7/jPopBox/dist/jPopBox.min.js // @connect lyck6.cn // @contributionURL https://lyck6.cn/pay // @antifeature payment 解锁付费题库需捐助 // @downloadURL none // ==/UserScript== //全局配置参数 var GLOBAL = { time: 3E3, //查题间隔时间,不建议小于5s,如果为了安全起见最好10s以上,即10E3 delay: 2E3, //延迟加载,页面初始化完毕之后的等待2s之后再去搜题, fillAnswerDelay: 1E3, //填充答案的延迟,不建议小于0.5秒,默认一秒 length: 400,//默认搜索框的长度,单位px可以适当调整 }; (function (exports) { 'use strict'; function sleep(time) { return new Promise((resolve) => { setTimeout(resolve, time); }) } function iframeMsg(type, message) { try { exports.top.document.getElementById('iframeNode').contentWindow.vueDefinedProp(type, message); } catch (e) { } } function getAnsForKey(keys, options) { let answers = []; keys.map(function (val) { let index = val.charCodeAt() - 65; answers.push(options[index]); }); return answers; } function filterImg(dom) { return $(dom).clone().find("img[src]").replaceWith(function () { return $("

").text(''); }).end().find("iframe[src]").replaceWith(function () { return $("

").text('