// ==UserScript== // @name 超星学习通智能刷课【可后台运行】 // @name:zh-TW // @name:en Chaoxing Automatic Learning Tool[One-click start] [Minimize run] // @description 【可手机挂机】支持【超星学习通】【学银在线】【超星系统的继续教育】的视频、章节测试、文档、直播、作业、考试;脚本一键启动、单页面全自动运行、可最小化运行不会中断;不占网速、不费流量,开热点也能用;【三亿题库】题目覆盖率99%,支持单选、多选、填空、判断【图片题、编程题、听力题】;题目答案实时收录,轻松拿高分 // @description:zh-TW 【可手机挂机】支援【超星學習通】【學銀線上】【超星系統的繼續教育】的影片、章節測驗、文件、直播、作業、考試;腳本一鍵啟動、單頁全自動運作、可最小化運作不會中斷;不佔網速、不費流量,開熱點也能用;【三億題庫】題目覆蓋率99%,支持單選、多選、填空、判斷【圖片題、程式設計題、聽力題】;題目答案即時收錄,輕鬆拿高分 // @description:en 【mobile phone supported】Supports videos, chapter tests, documents, live broadcasts, homework, and exams of [Chaoxing], [Xueyin Online]; scripts can be started with one click, run automatically on a single page, and can be minimized and run without interruption; does not occupy network speed or traffic; [300 millions questions] covers 99% of questions, supports single-choice, multiple-choice, fill-in-the-blank, judgment [picture questions, programming questions, listening questions] // @antifeature payment 脚本会请求第三方收费题库进行答题,您可以选择付费或停用答题功能 // @antifeature:zh-TW payment 腳本會請求第三方收費題庫進行答題,您可以選擇付費或停用答案功能 // @antifeature:en payment The script will request a third-party paid question bank to answer questions. You can choose to pay or disable the answering function. // @namespace 小苏 // @version 2.0 // @author 小苏 // @run-at document-end // @storageName 小苏 // @match *://*/* // @icon http://pan-yz.chaoxing.com/favicon.ico // @grant unsafeWindow // @grant GM_xmlhttpRequest // @grant GM_setValue // @grant GM_getValue //👇👇👇👇👇👇👇👇Please fill in the code prompted by the script into the blanks below, one per line, and press Ctrl+S to save.👇👇👇👇👇👇👇👇 //👇👇👇👇👇👇👇👇請將腳本提示的程式碼填入下面空白中,一行一個,按Ctrl+S儲存👇👇👇👇👇👇👇 //👇👇👇👇👇👇👇👇请将脚本提示的代码填入下面空白中,一行一个,按Ctrl+S保存👇👇👇👇👇👇👇👇 //👆👆👆👆👆👆👆👆请将脚本提示的代码填入上面空白中,一行一个,按Ctrl+S保存👆👆👆👆👆👆👆👆 //👆👆👆👆👆👆👆👆請將腳本提示的程式碼填入上面空白中,一行一個,按Ctrl+S儲存👆👆👆👆👆👆👆 //👆👆👆👆👆👆👆👆Please fill in the code prompted by the script into the blanks above, one per line, and press Ctrl+S to save.👆👆👆👆👆👆👆 // @connect mooc1.chaoxing.com // @connect mooc1-1.chaoxing.com // @connect mooc1-2.chaoxing.com // @connect mooc2-ans.chaoxing.com // @connect mooc1-api.chaoxing.com // @connect stat2-ans.chaoxing.com // @connect passport2.chaoxing.com // @connect zhibo.chaoxing.com //---------------------------------------- // @connect mooc1.hnust.edu.cn // @connect stat2-ans.hnust.edu.cn // @connect passport2.hnust.edu.cn //---------------------------------------- // @connect mooc1.hnsyu.net // @connect stat2-ans.hnsyu.net // @connect passport2.hnsyu.net //---------------------------------------- // @connect mooc1.gdhkmooc.com // @connect stat2-ans.gdhkmooc.com // @connect passport2.gdhkmooc.com //---------------------------------------- // @connect mooc1.zut.edu.cn // @connect stat2-ans.zut.edu.cn // @connect passport2.zut.edu.cn //---------------------------------------- // @connect mooc1.wljx.hfut.edu.cn // @connect stat2-ans.wljx.hfut.edu.cn // @connect passport2.wljx.hfut.edu.cn //---------------------------------------- // @connect mooc1.hncj.edu.cn // @connect stat2-ans.hncj.edu.cn // @connect passport2.hncj.edu.cn //---------------------------------------- // @connect mooc1.qutjxjy.cn // @connect stat2-ans.qutjxjy.cn // @connect passport2.qutjxjy.cn //---------------------------------------- // @connect mooc1.jxjyzx.xust.edu.cn // @connect stat2-ans.jxjyzx.xust.edu.cn // @connect passport2.jxjyzx.xust.edu.cn //---------------------------------------- // @connect mooc1.xueyinonline.com // @connect stat2-ans.xueyinonline.com // @connect passport2.xueyinonline.com //---------------------------------------- // @connect mooc1.cqrspx.cn // @connect stat2-ans.cqrspx.cn // @connect passport2.cqrspx.cn //---------------------------------------- // @connect mooc1.ynny.cn // @connect stat2-ans.ynny.cn // @connect passport2.ynny.cn //---------------------------------------- // @connect mooc1.cugbonline.cn // @connect stat2-ans.cugbonline.cn // @connect passport2.cugbonline.cn //---------------------------------------- // @connect mooc1.xust.edu.cn // @connect stat2-ans.xust.edu.cn // @connect passport2.xust.edu.cn //---------------------------------------- // @connect mooc1.xynu.edu.cn // @connect stat2-ans.xynu.edu.cn // @connect passport2.xynu.edu.cn //---------------------------------------- // @connect mooc1.hnvist.cn // @connect stat2-ans.hnvist.cn // @connect passport2.hnvist.cn //---------------------------------------- // @connect mooc1.ecnusole.com // @connect stat2-ans.ecnusole.com // @connect passport2.ecnusole.com //---------------------------------------- // @connect mooc.s.ecust.edu.cn // @connect webvpn.ahmu.edu.cn //---------------------------------------- // @connect tk.axetk.cn // @connect tk.tk.icu // @connect tk.wanjuantiku.com // @connect ans.tk.icu // @connect 127.0.0.1 // @license MIT // @compatible firefox // @compatible chrome // @compatible edge // @supportURL https://tk.tk.icu/ // ==/UserScript== !!(function () { const //--------------------------------------------------------------------------- 是否启用后台服务器 = '0',//改为1则启用后台服务器,请先学习使用方法:https://bbs.tampermonkey.net.cn/thread-5249-1-1.html //Change 1/0 to enable background program,Please learn how to use it:https://bbs.tampermonkey.net.cn/thread-5249-1-1.html 服务器地址 = '127.0.0.1',//用于对接后台服务器,不懂不要修改 //Do not change this if you don't know how it works 端口 = '6503'; //后台服务器端口,不懂不要修改 //Do not change this if you don't know how it works //--------------------------------------------------------------------------- // 音频文件的base64,是一段静音音频,在后台播放可以防止页面休眠 // ---------- // 别看了,屎山 // ---------- let $w = unsafeWindow, $l = $w.location.href, $d = $w.document, $version = GM_info.script.version.replaceAll('.', ''), // 调用$s[value]可以获取url查询值 $s = Object.fromEntries(new URLSearchParams($w.location.search)), $protocol = $w.location.protocol + "//", getCookie = name => `; ${document.cookie}`.split(`; ${name}=`).pop().split(';').shift(), $uid = getCookie('UID') || getCookie('_uid') || $s['uid'], // 自己封装的仿layer弹窗,因为从外部调用js可能受网络影响 $layer = (info) => { const body = $d.body; const shadow = $d.createElement('div'); const alert = $d.createElement('div'); const alertHead = $d.createElement('div'); const alertBody = $d.createElement('div'); const buttons = $d.createElement('div'); const button = $d.createElement('span'); shadow.classList.add('shadow'); alert.classList.add('alert'); alertHead.classList.add('alertHead'); alertBody.classList.add('alertBody'); buttons.classList.add('buttons'); button.classList.add('button'); alertHead.innerHTML = '提示' alertBody.innerHTML = info; button.innerHTML = '确定'; button.addEventListener('click', () => { shadow.remove(); alert.remove(); }); buttons.appendChild(button); alert.appendChild(alertHead) alert.appendChild(alertBody) alert.appendChild(buttons) body.appendChild(shadow); body.appendChild(alert); }, // 根据ascii排序数组元素 $ascii = (str) => { return str.split('').sort((a, b) => a.charCodeAt(0) - b.charCodeAt(0)).join(''); }, // 生成随机32位字符串 randomString = (z = false) => { let t = "abcdef1234567890", result = '' z && (t += "ghijklmnopqrstuvwxyz") for (let i = 0; i < 32; i++) { const randomIndex = Math.floor(Math.random() * t.length); result += t[randomIndex]; } return result }, // 生成随机毫秒数,例如$(1,2)可能返回1500 $n = function (min, max) { if (arguments.length == 1) { max = min + 1; if (min > 1) { min = min - 1 } } else if (arguments.length == 0) { min = 4; max = 6; } return (Math.random() * (max - min) + min).toFixed(3) * 1000; }, // sleep函数,使用await调用 sleep = (interval) => { return new Promise((success, fail) => { setTimeout(success, interval); }); }, hostList = [ 'https://tk.tk.icu/', 'https://tk.axetk.cn/', 'https://tk.wanjuantiku.com/' ], host = '', handleImgs = (s) => { // 去除字符串中的style与script标签和其中的内容 s = s.replace(/