// ==UserScript== // @name 小柴答题助手|学习通 超星 自动刷课 AI答题 每天免费100题 // @namespace https://rainbowchaii.com/dati // @version 1.7.2 // @description 学习通(超星)自动看课和 AI 答题:视频静音续播、文档自动完成、章节测验 AI 作答,看完自动进入下一节。不登录先送 30 题试用,邮箱注册登录后每天免费 100 题,用完可买积分。AI 答案不保证全对,交卷前请自己检查。 // @author 小柴 // @tag 超星学习通 // @tag 自动刷课 // @tag AI答题 // @antifeature payment 每天免费题数用完后,答题需要购买积分 // @match *://*/* // @run-at document-start // @icon data:image/webp;base64,UklGRiYRAABXRUJQVlA4WAoAAAAQAAAARwAAXwAAQUxQSAgFAAAB8EVbu2nbtm19f/5Lt4dt27Zt27ZtY2rYtm3btm2rtZrz/38PrdVacs2lz/eImADUHzMQUHRTgTEzCgRdFRnnms/fPGEaBMkmAVP867PfHp0coSsBt5Pkr7sDIVMAtv+BJB8MXVEsyZZZJC8fjJAlYNAFZHSPXAralXM9kvTER8aHZggY72EmJ5n8km4Ihn9KY9/IF8eH1goY50W22Nf4xXBINsVidPYf+eL4CDUCxnuOkf27LwbNVuEAxjaMfGRoUK0qDSGIVlrp4EfYYtvIfVBlU1zF1I6RV6DupYxsn3gFNJeIvETrgC0eNumyu/3nmnvvu/f+m87Ye7FjGdmh8fkAyYVxvqF3Qucv7NzZqfPb0dkCpv+nBklLMaaUUozJjDXi9AiZFPPTWdPZRefC0GzL0up01bl8F9YpKnFDVNnW+j+1XheWoBfkXAqaKWDWSC/GaXMhZBJM9FNRP4wDySXVa7RiEp8OgtyKK5iKiTwbVbZKtmYsxvjqEJFcijMLYuLu0ExBpvubXo75h4NF8ihOZmLBidtCswhGfUEr62WVLIp1mFi028LQHAFXeywr8gxUGQTj/kAvy/jBYEg9xao0Fu5cMmiO/zKWlng+BtST8BatNPeeFRDqVFjOjMW7/7kVQmeCEW+wAUy8sYbIJA/TWL7xqREiHSmWYSOdrakROkLAit+5l2c8MAR0XmE9RhZv/jxEagSZ4xl6cYkbiaKuoH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N8Obl0uwbQpP6ItUTkoPvqURMUN04ylngxpiluOG5aQiUdbTMyhmIZeKLqtDd7gudq2A+xWZ4p0e1C2DNfALE7/iIBQmHSD/dkbRTE25VbVpCf6vKV9kt7mVxjzu2dZZ0l471UuU4WYd9Q50GY4Of89QdHRXJfRUGTP53U3t9Nlowp8JpsWEW/4oluPtorrHa6rbhwgahbGsBXpmhqeihr1/+FYNm2+ZuoVo7DbnMQwzumOEMvJKc6A64yjvBblj+3yw8M5Ti7/AP7ndaGzSkX2JcrAI/+2UfRDJ63wHO/hMxfY9zPws5Z4yZLll+q0wk8u9Xm7wsiCc0FkDbPxeijw9xQu8ltTaWzo/Amshm81UEdH5mX6WnDwpAz2CdUyGF3Lu+BGijWTV8+e364gf95T1fR7uYnVFtna4bK3HRUNNrhpsdeb1ih2scI2Vbg1UnYu/24uisrs3hBMNRTyqwmHRY2kq31p0TNUSVqF5kfnqqkrr4vzRbRIr9mElt1ZJJ+07+CtPLMmn+0s/D06fuAgLIC6VwNNSQQqVEkcYIs1wu6+oL13m7+D2RlGGvTZVbv3AxdClKiaryzcLNiK8X5uCuUH0e5cM78mFDw1L69tZP5z+MyDNR9WYNwGLl5e09cs9HbzG6j4dszuT80IT1jYfUaDmI2N9r8a6Q4/Ir8iDc2LAV5YqlmRbfMCO9xbcy2HUWG8vhFfr4YGZJw89Hg5Inb5SyLvilu0w/AnyiCEFAdwhWV8AAA // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_getResourceText // @grant GM_info // @grant unsafeWindow // @grant GM_openInTab // @connect api.rainbowchaii.com // @connect * // @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js // @require https://cdn.jsdelivr.net/npm/js-md5@0.8.3/build/md5.min.js // @resource cxTable https://cdn.jsdelivr.net/npm/tiku-static-assets@1.0.0/cx_table.json // ==/UserScript== /* 小柴答题助手 1.7.2 — 引擎、面板和 AI 接口为小柴自研;各平台的页面适配规则参考了社区答题脚本整理。 */ (function () { "use strict"; const W = typeof unsafeWindow !== "undefined" ? unsafeWindow : window; const $ = jQuery; const IS_TOP = (() => { try { return window.top === window.self; } catch (e) { return false; } })(); /* ---------- 设置 ---------- */ const SVC = "https://api.rainbowchaii.com/api/dati"; // 小柴答题服务:账号、积分、代答 const DEFAULT_CFG = { token: "", // 小柴答题登录凭证 acct: "", // 登录的账号(显示用,手机号中间打码) delay: 1, // 每题填写间隔(秒) concurrency: 4, // 同时向模型要几道题的答案 study: true, // 学习通:自动完成任务点(视频、文档、章节测验)并切下一节 autoChapter: true, // 学习通:「全自动」,本节任务点完成后自动进入下一节 studyRate: 1, // 学习通视频倍速(1–2,倍速有被判异常的风险) autoSubmit: false, // 学习通章节测验答完自动提交(有题没答案时不交) fillDelay: 600, // 点选项之间的间隔(毫秒) autoNext: true, // 答完自动下一页/下一题 vision: false, // 题目里的图片发给模型 adapter: "", // 可选:自己的题库接口(POST {question,options,type} → {answer:{allAnswer}}) }; // 旧版「自带密钥」模式已删掉,读到当时存的字段就从本机清除 const OLD_KEYS = ["mode", "base", "key", "model"]; const cfg = () => { const saved = GM_getValue("xc_cfg") || {}; if (OLD_KEYS.some((k) => k in saved)) { OLD_KEYS.forEach((k) => delete saved[k]); GM_setValue("xc_cfg", saved); } return Object.assign({}, DEFAULT_CFG, saved); }; // 设备编号:未登录试用额度按它记(服务器只存它的哈希) const deviceId = () => { let d = GM_getValue("xc_device"); if (!d) { d = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID().replace(/-/g, "") : md5(Math.random() + "|" + Date.now() + "|" + navigator.userAgent); GM_setValue("xc_device", d); } return d; }; const saveCfg = (patch) => GM_setValue("xc_cfg", Object.assign(cfg(), patch)); const paused = () => Boolean(GM_getValue("xc_paused", false)); /* ---------- 运行时上下文(适配规则共用) ---------- */ const X = { json: [], index: 0, i: 0, matched: false, site: "" }; /* ---------- 基础工具 ---------- */ const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); function waitUntil(cond, cb, every = 1000) { const t = setInterval(() => { let ok = false; try { ok = cond(); } catch (e) {} if (ok) { clearInterval(t); cb(); } }, every); } function withTimeout(p, ms, fallback) { let t; return Promise.race([p, new Promise((res, rej) => { t = setTimeout(() => (fallback === undefined ? rej(new Error("超时")) : res(fallback)), ms); })]).finally(() => clearTimeout(t)); } function decodeHTML(s) { const d = document.createElement("div"); d.innerHTML = s; return d.innerText || d.textContent || ""; } /** 统一文本:全角转半角、压空白、统一引号、去尾部标点 */ function fmt(src) { let s = String(src == null ? "" : src); if (!/ String.fromCharCode(c.charCodeAt(0) - 0xfee0)); return s.replace(/\s+/g, " ").replace(/[“”]/g, '"').replace(/[‘’]/g, "'").replace(/。/g, ".").replace(/[,.?:!;]$/, "").trim(); } /** 取元素文字,图片和 iframe 保留成 文本,方便识图 */ function imgText(el) { const c = $(el).clone(); c.find("img[src]").each(function () { $(this).replaceWith($("

").text('')); }); c.find("iframe[src]").each(function () { $(this).replaceWith($("

").text('')); }); return c.text().trim(); } /* ---------- 题型 ---------- */ // 0 单选 1 多选 2 填空 3 判断 4 简答 5 名词解释 6 论述 7 计算 8 其它 9 分录 10 资料 11 连线 13 排序 14 完形 15 阅读 66 阅读选择 const TYPE_NAMES = { 0: "单选题", 1: "多选题", 2: "填空题", 3: "判断题", 4: "简答题", 5: "名词解释", 6: "论述题", 7: "计算题", 8: "其它", 9: "分录题", 10: "资料题", 11: "连线题", 13: "排序题", 14: "完形填空", 15: "阅读理解", 66: "阅读理解(选择)" }; const TEXT_TYPES = [2, 4, 5, 6, 7, 8, 9, 10]; const TYPE_WORDS = [ ["阅读理解(选择)/完型填空", 66], ["听力训练", 66], ["multichoice", 1], ["singlechoice", 0], ["SingleChoice", 0], ["bijudgement", 3], ["Judgement", 3], ["单项选择题", 0], ["单项选择", 0], ["单选题", 0], ["单选", 0], ["多项选择题", 1], ["多项选择", 1], ["多选题", 1], ["多选", 1], ["案例分析", 1], ["客观题", 1], ["A1A2题", 1], ["视频题", 1], ["填空题", 2], ["填空", 2], ["对错题", 3], ["判断正误", 3], ["判断题", 3], ["判断", 3], ["主观题", 4], ["问答题", 4], ["简答题", 4], ["文件作答", 4], ["名词解释", 5], ["论述题", 6], ["计算题", 7], ["其它", 8], ["分录题", 9], ["资料题", 10], ["连线题", 11], ["排序题", 13], ["完形填空", 14], ["完型填空", 14], ["阅读理解", 15], ["口语题", 18], ["听力题", 19], ]; const TYPE_MAP = Object.fromEntries(TYPE_WORDS); function qtype(str) { if (!str) return undefined; const s = String(str).trim().replace(/\s+/g, ""); if (s in TYPE_MAP) return TYPE_MAP[s]; for (const [w, t] of TYPE_WORDS) if (s.includes(w)) return t; return undefined; } /** 没有题型元素时按控件猜:2 个单选=判断,多个单选=单选,多个复选=多选,有文本框=简答 */ function guessType($opts) { const count = (sel) => { let n = 0; for (const o of $opts || []) if ($(o).find(sel).length || $(o).parent().find(sel).length) n++; return n; }; const radio = count('[type="radio"]'); if (radio === 2) return 3; if (radio > 2) return 0; if (count('[type="checkbox"]') > 2) return 1; if (count("textarea") >= 1) return 4; return undefined; } /* ---------- 答案匹配 ---------- */ const isTrue = (s) => /(^|,)(正确|是|对|√|T|ri|true|A)(,|$)/i.test(String(s)); const isFalse = (s) => /(^|,)(错误|否|错|×|F|不是|wr|false|B)(,|$)/i.test(String(s)); function editSimilarity(a, b) { if (!a || !b) return 0; if (a === b) return 1; const n = a.length, m = b.length; let prev = Array.from({ length: m + 1 }, (_, j) => j); for (let i = 1; i <= n; i++) { const cur = [i]; for (let j = 1; j <= m; j++) cur[j] = Math.min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)); prev = cur; } return 1 - prev[m] / Math.max(n, m); } const normOpt = (s) => fmt(s).toLowerCase().replace(/\s/g, ""); /** 把一组答案文字(字母或选项原文)换成选项下标 */ function answersToIndices(answers, options, type) { const out = new Set(); const opts = (options || []).map(normOpt); if (type === 3) { const joined = answers.join(","); if (/^[AB]$/.test(joined.trim()) && options && options.length >= 2) return [joined.trim().charCodeAt(0) - 65]; // 判断题:第一个选项是“对”时,对→0、错→1;反之相反 const firstIsFalse = isFalse(options && options[0]); if (isTrue(joined) && !isFalse(joined)) out.add(firstIsFalse ? 1 : 0); else if (isFalse(joined)) out.add(firstIsFalse ? 0 : 1); return [...out]; } for (const a of answers) { const raw = String(a).trim(); if (/^[A-Z]{1,8}$/.test(raw) && [...raw].every((c, i, arr) => i === 0 || c > arr[i - 1])) { for (const c of raw) if (c.charCodeAt(0) - 65 < opts.length) out.add(c.charCodeAt(0) - 65); continue; } const v = normOpt(raw); const k = opts.indexOf(v); if (k >= 0) { out.add(k); continue; } if (v.length >= 4 && !v.includes(" editSimilarity(o, v)); const best = Math.max(...scores); if (best > 0.65) out.add(scores.indexOf(best)); } } return [...out].sort((a, b) => a - b); } /* ---------- 超星加密字体还原 ---------- * 超星把题目文字换成私有字体(.font-cxsecret)。做法:解析页面内嵌的 TTF, * 把每个字形的轮廓按 Typr 的路径格式序列化后取 md5 末 8 位,查公开的字形对照表还原成真实汉字。 */ const CxFont = (() => { function readFont(buf) { const u16 = (o) => (buf[o] << 8) | buf[o + 1]; const i16 = (o) => { const v = u16(o); return v & 0x8000 ? v - 0x10000 : v; }; const u32 = (o) => ((buf[o] << 24) | (buf[o + 1] << 16) | (buf[o + 2] << 8) | buf[o + 3]) >>> 0; const tables = {}; for (let i = 0, p = 12; i < u16(4); i++, p += 16) { tables[String.fromCharCode(buf[p], buf[p + 1], buf[p + 2], buf[p + 3])] = { off: u32(p + 8) }; } const { glyf, loca, maxp, head, cmap } = tables; if (!glyf || !loca || !maxp || !head || !cmap) return null; const glyphCount = u16(maxp.off + 4); const longLoca = i16(head.off + 50) !== 0; const offsets = []; for (let i = 0; i <= glyphCount; i++) offsets.push(longLoca ? u32(loca.off + i * 4) : u16(loca.off + i * 2) * 2); // cmap format 4:字符 → 字形编号 const charMap = {}; for (let i = 0; i < u16(cmap.off + 2); i++) { const sub = cmap.off + u32(cmap.off + 4 + i * 8 + 4); if (u16(sub) !== 4) continue; const segX2 = u16(sub + 6), ends = sub + 14, starts = ends + segX2 + 2, deltas = starts + segX2, ranges = deltas + segX2; for (let s = 0; s < segX2 / 2; s++) { const end = u16(ends + s * 2), start = u16(starts + s * 2), delta = u16(deltas + s * 2), ro = u16(ranges + s * 2); if (start === 0xffff) continue; for (let ch = start; ch <= end; ch++) { let g; if (ro === 0) g = (ch + delta) & 0xffff; else { const gi = u16(ranges + s * 2 + ro + (ch - start) * 2); g = gi === 0 ? 0 : (gi + delta) & 0xffff; } if (g) charMap[ch] = g; } } break; } return { buf, u16, i16, glyfOff: glyf.off, offsets, charMap }; } function readGlyph(F, g) { const { buf, u16, i16, offsets } = F; if (offsets[g] === offsets[g + 1]) return null; let o = F.glyfOff + offsets[g]; const gl = { noc: i16(o), xMin: i16(o + 2), yMin: i16(o + 4), xMax: i16(o + 6), yMax: i16(o + 8) }; o += 10; if (gl.xMin >= gl.xMax || gl.yMin >= gl.yMax) return null; if (gl.noc > 0) { gl.endPts = []; for (let i = 0; i < gl.noc; i++, o += 2) gl.endPts.push(u16(o)); const instLen = u16(o); o += 2; if (buf.length - o < instLen) return null; o += instLen; const n = gl.endPts[gl.noc - 1] + 1; gl.flags = []; for (let i = 0; i < n; i++) { const f = buf[o++]; gl.flags.push(f); if (f & 8) { const r = buf[o++]; for (let j = 0; j < r; j++, i++) gl.flags.push(f); } } const coords = (shortBit, sameBit) => { const arr = []; for (let i = 0; i < n; i++) { const f = gl.flags[i]; if (f & shortBit) { arr.push(f & sameBit ? buf[o] : -buf[o]); o++; } else if (f & sameBit) arr.push(0); else { arr.push(i16(o)); o += 2; } } for (let i = 1; i < n; i++) arr[i] += arr[i - 1]; return arr; }; gl.xs = coords(2, 16); gl.ys = coords(4, 32); } else { gl.parts = []; let flags; do { flags = u16(o); o += 2; const part = { m: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 }, glyphIndex: u16(o) }; o += 2; let a1, a2; if (flags & 1) { a1 = i16(o); a2 = i16(o + 2); o += 4; } else { a1 = (buf[o] << 24) >> 24; a2 = (buf[o + 1] << 24) >> 24; o += 2; } if (flags & 2) { part.m.tx = a1; part.m.ty = a2; } const f2 = (p) => i16(p) / 16384; if (flags & 8) { part.m.a = part.m.d = f2(o); o += 2; } else if (flags & 64) { part.m.a = f2(o); part.m.d = f2(o + 2); o += 4; } else if (flags & 128) { part.m.a = f2(o); part.m.b = f2(o + 2); part.m.c = f2(o + 4); part.m.d = f2(o + 6); o += 8; } gl.parts.push(part); } while (flags & 32); } return gl; } function drawGlyph(F, g, path) { const gl = readGlyph(F, g); if (!gl) return; const M = (x, y) => { path.cmds.push("M"); path.crds.push(x, y); }; const L = (x, y) => { path.cmds.push("L"); path.crds.push(x, y); }; const Q = (a, b, c, d) => { path.cmds.push("Q"); path.crds.push(a, b, c, d); }; if (gl.noc > -1) { for (let c = 0; c < gl.noc; c++) { const i0 = c === 0 ? 0 : gl.endPts[c - 1] + 1, il = gl.endPts[c]; for (let i = i0; i <= il; i++) { const pr = i === i0 ? il : i - 1, nx = i === il ? i0 : i + 1; const on = gl.flags[i] & 1, prOn = gl.flags[pr] & 1, nxOn = gl.flags[nx] & 1; const x = gl.xs[i], y = gl.ys[i]; if (i === i0) { if (on) { if (prOn) M(gl.xs[pr], gl.ys[pr]); else { M(x, y); continue; } } else if (prOn) M(gl.xs[pr], gl.ys[pr]); else M(Math.floor((gl.xs[pr] + x) * 0.5), Math.floor((gl.ys[pr] + y) * 0.5)); } if (on) { if (prOn) L(x, y); } else if (nxOn) Q(x, y, gl.xs[nx], gl.ys[nx]); else Q(x, y, Math.floor((x + gl.xs[nx]) * 0.5), Math.floor((y + gl.ys[nx]) * 0.5)); } path.cmds.push("Z"); } } else { for (const part of gl.parts) { const sub = { cmds: [], crds: [] }; drawGlyph(F, part.glyphIndex, sub); const m = part.m; for (let i = 0; i < sub.crds.length; i += 2) { const x = sub.crds[i], y = sub.crds[i + 1]; path.crds.push(x * m.a + y * m.b + m.tx, x * m.c + y * m.d + m.ty); } path.cmds.push(...sub.cmds); } } } let table = null; function getTable() { if (!table) { try { table = JSON.parse(GM_getResourceText("cxTable")); } catch (e) { table = {}; } } return table; } function buildMap(b64) { const bin = atob(b64), buf = new Uint8Array(bin.length); for (let i = 0; i < bin.length; i++) buf[i] = bin.charCodeAt(i); const F = readFont(buf); if (!F) return null; const t = getTable(), map = {}; for (const code in F.charMap) { const path = { cmds: [], crds: [] }; drawGlyph(F, F.charMap[code], path); const real = t[md5(JSON.stringify(path)).slice(24)]; if (real) map[code] = String.fromCharCode(real); } return map; } function replaceIn(root, map) { const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT); const nodes = []; while (walker.nextNode()) nodes.push(walker.currentNode); for (const n of nodes) { const s = n.nodeValue; let out = "", changed = false; for (const ch of s) { const r = map[ch.charCodeAt(0)]; if (r !== undefined) { out += r; changed = true; } else out += ch; } if (changed) n.nodeValue = out; } } function run() { let map = null; for (const st of document.querySelectorAll("style")) { if (!st.textContent.includes("font-cxsecret")) continue; const m = st.textContent.match(/base64,([\w\W]+?)'/); if (!m) continue; const sub = buildMap(m[1]); if (sub) map = Object.assign(map || {}, sub); } if (!map || !Object.keys(map).length) return false; const apply = () => document.querySelectorAll(".font-cxsecret").forEach((el) => { replaceIn(el, map); el.classList.remove("font-cxsecret"); }); apply(); new MutationObserver(apply).observe(document.body, { childList: true, subtree: true }); return true; } return { run }; })(); /* ---------- 解除复制、粘贴、右键限制 ---------- */ function unlockCopy() { const evs = ["copy", "cut", "paste", "selectstart", "contextmenu", "dragstart", "beforecopy"]; try { const proto = W.Event.prototype, orig = proto.preventDefault; proto.preventDefault = function () { if (!evs.includes(this.type)) return orig.apply(this, arguments); }; } catch (e) {} const clear = () => { for (const el of [document, document.body, ...document.querySelectorAll("[oncopy],[onpaste],[oncut],[onselectstart],[oncontextmenu],[ondragstart]")]) { if (!el) continue; for (const e of evs) { try { if (el["on" + e]) el["on" + e] = null; } catch (err) {} } } }; clear(); setTimeout(clear, 1500); setInterval(clear, 10000); try { const st = document.createElement("style"); st.textContent = "*{user-select:text!important;-webkit-user-select:text!important}"; document.head.appendChild(st); } catch (e) {} } /** 章节测验等页面答题前的准备:还原加密字体 + 解除限制 */ function prepare() { try { CxFont.run(); } catch (e) { console.warn("[小柴答题] 字体还原失败", e); } try { unlockCopy(); } catch (e) {} } /* ---------- 网络 ---------- */ function gmRequest({ method = "GET", url, headers = {}, data, timeout = 90000 }) { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method, url, headers, data, timeout, onload: (r) => resolve(r), onerror: () => reject(new Error("网络请求失败")), ontimeout: () => reject(new Error("请求超时")), }); }); } /** 调小柴答题服务。401 时清掉失效的登录凭证。 */ async function svc(path, body) { const c = cfg(); const headers = { "Content-Type": "application/json" }; if (c.token) headers.Authorization = "Bearer " + c.token; const r = await gmRequest({ method: body === undefined ? "GET" : "POST", url: SVC + path, headers, data: body === undefined ? undefined : JSON.stringify(body), timeout: 100000 }); let j = {}; try { j = JSON.parse(r.responseText); } catch (e) {} if (r.status >= 400 || j.ok === false) { const e = new Error(j.error || "服务暂时不可用(" + r.status + ")"); e.status = r.status; e.data = j; if (r.status === 401 && c.token) saveCfg({ token: "", acct: "" }); throw e; } return j; } /* ---------- 答案缓存(同一道题不重复花钱) ---------- */ const CACHE_KEY = "xc_cache"; const cacheId = (d) => md5(d.type + "|" + d.question + "|" + (d.options || []).join("|")); function cacheGet(d) { const c = GM_getValue(CACHE_KEY) || {}; return c[cacheId(d)]; } function cachePut(d, ans) { const c = GM_getValue(CACHE_KEY) || {}; c[cacheId(d)] = ans; const keys = Object.keys(c); if (keys.length > 1500) keys.slice(0, keys.length - 1500).forEach((k) => delete c[k]); GM_setValue(CACHE_KEY, c); } const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; function extractImages(d) { const all = [String(d.question), ...(d.options || []).map(String)].join(" "); return [...all.matchAll(//g)].map((m) => m[1]).filter((u) => /^https?:|^data:/.test(u)).slice(0, 4); } /** 问小柴答题服务,返回答案文字数组。服务器拼提示词、问模型、扣积分。 */ async function askAI(d) { const c = cfg(); // 同一道题同一天用同一个编号,网络重试不会重复扣分。没登录时带设备编号,用试用额度。 const j = await svc("/answer", { device: c.token ? undefined : deviceId(), requestId: md5((c.token ? c.token.slice(-12) : deviceId()) + "|" + cacheId(d) + "|" + new Date().toISOString().slice(0, 10)), type: d.type, question: String(d.question), options: (d.options || []).map(String), blanks: (d.$options && d.$options.length) || 0, images: c.vision ? extractImages(d) : [], site: location.hostname, }); if (typeof j.balance === "number") GM_setValue("xc_balance", j.balance); if (j.free) GM_setValue("xc_free", j.free); GM_setValue("xc_needBuy", 0); if (j.trial) GM_setValue("xc_trial", j.trial); return j.answer || []; } /** 自定义题库接口(可选,兼容 tikuAdapter 格式) */ async function askAdapter(d) { const url = cfg().adapter; if (!url) return []; try { const r = await withTimeout(gmRequest({ method: "POST", url, headers: { "Content-Type": "application/json;charset=utf-8" }, data: JSON.stringify({ question: d.question, options: d.options, type: d.type }) }), 6000); const j = JSON.parse(r.responseText); const all = j.answer && j.answer.allAnswer; return Array.isArray(all) && all.length ? all[0] : []; } catch (e) { return []; } } /* ---------- 面板 ---------- * 题目常在 iframe 里,面板只在顶层窗口显示;各层 frame 用 postMessage 把进度发上来。 */ const MSG_TAG = "__xiaochai_dati__"; const sentLog = []; const FRAME_ID = Math.random().toString(36).slice(2, 8); let msgSeq = 0; const ui = { send(kind, payload) { const msg = Object.assign({ [MSG_TAG]: 1, kind, site: X.site, id: FRAME_ID + ":" + msgSeq++ }, payload || {}); if (IS_TOP) return Panel.handle(msg); sentLog.push(msg); if (sentLog.length > 300) sentLog.splice(0, sentLog.length - 300); try { window.top.postMessage(msg, "*"); } catch (e) {} }, ready(site) { ui.send("ready", { site }); }, tip(text, level = "info") { ui.send("tip", { text, level }); }, push(row) { ui.send("row", { row }); }, progress(index, total) { ui.send("progress", { index, total }); }, state(state) { ui.send("state", { state }); }, /** 面板大字区:{ label, big, sub, pct },传 null 清掉,回到答题进度 */ now(now) { ui.send("now", { now }); }, }; // 小柴家族按钮的小图标(线条 1.75,16px) const svgI = (d) => '"; const PROMO_ICON = { shop: svgI(''), // 皇冠:AI 会员 canvas: svgI(''), // 图片:AI 画布 wardrobe: svgI(''), // 衣服:小柴衣柜 qq: svgI(''), link: svgI(''), }; const IMG = { happy: "data:image/webp;base64,UklGRqwdAABXRUJQVlA4WAoAAAAQAAAAdgAApwAAQUxQSDUIAAABsEbbtmnN1Vxr34+xbdspfPXFKDy/2LZtp2wjtm3bTtkVvEKclO/ea/74zj33nFv7tPc3IiYAVW/btVvHVQEVLNOizjlB7Wrddb/6sHT8rRsBsgypQ6LUjOJfTJ57XgN0mXEANm1t6QBIjYis+Yl50oIn72+AWzZUseHVb80h7a71ILXhcBQDE83zgUbosqDAoZNIGgPvLWlNiNS9ahVIz4c3htaew/pjAn0w0sp2CFwtKHb4k1aJnhPXgKs1h63H0wITPR8WrQWHixmY1vOhZmhtlbD1RHpjcuDsdaE1oHjAfCp6PtQMrSWHbSbSM6XxeLj8BBv8wJCOng83Q2tGHA6bSs+0ZY4WzU/RjcZqPR9uhtSIOJxUZmDqwK8aILk53ERfFT0fXkGlJsTh5KUWmN44f3toXiLuwSzoeT1UpY2ISHbicMpSGqs1ngyXGxrHM2RgfvHZANQ5BwDqnBNAxCWLCAB1wKllGqsu26D8FDv+RsuARt6/1fJou9IKK6KtOqRWB6Dh4jKN1Xs+4kRycuhKY6ZG/jLh7mEjhzw1Y+rkO0afc+A6QMNaB3Xp3Llzl4PWXGFFANse8jxpzDBwWiPy62E+GzKwyhl3D/nwBybPnDbpziHP/kEGY0Yr1UB/ZkYLvm0IwftgbGvJTA6BGZvfFy63fjlUG7wPxuQQgi97Y+bGvSNS04HHF1OZI4pqcFEN+T9rcA30j5HxXzXQO07756Y4jBYdswXtoDmVtDt9dAKnN0FyAgZFyPNZJznpSpu9xhCdMnvDIU/FrtN+YYQ9n3Sai8M+pEUocHoTJJ/WYIzS5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gfMO62hYcRdDYimDBIozaNS2MKIMlASOmE2L19RGYU0wJIyH+zai2i1+vxR1u3Fr1ORDkMV51hNk1WdX2OfEjk4IQ+bt5vCViv5xlW8ZtxmlMh5GOJNQM3x3XwNEsJZxS4tYVJurmze8LgnJyo/vzLF4QIn7ckpzUm+nr5bODk1bgCm+k8PxaUUqO6HHH2OoqmhIgQ9tyFrHLDZGFgbBHY/VHsSXGaWrhJLslzFnnl1nXOWMahXoJdGTaYl36IObCRVKDdv2Of3/W9cmpd2wPK/iCPgfcdRRJRrBFYteAhSS2X2jWsTVa8N/IIjVeGupaSBp7H9iSz/DCSnessgvD9t0HxYc4Vj9mpIpxv9vsBwyyof2vLsmX+d+d8npDE/MAYh6QPohyR31kYz2dNmh19UhpmwqbVurwYgv3P2ciVAsMYnTUTKk8p0IlPmNFRVxV1BErUVyc2r8+zPsgt4slJwp+XAPu5etEjKY/X2Er0YNo1k1jX3bP+D/x+dDiCx4W57Ji3ryY6oPb6YDdttts24tuCsVK7R390uW44f1sf/SADTZVl+NGmPC1GnXvX0vR3aFkB9rN/EDJn9j0egDVILAqpkDi5Ru+Bfl+PMRy3OM2YF4Jb2TxHqDWuyV6Hw4PPyDgs3JQN2WrVFNY3a77Dju43RCGxDf1Zpz5o1FScbQ35CVMMDLRb0Mm+IGCUSeQ2hY7JKRMAqxZxHuwRd0I1p1Z15Z43c0MLIwt4mK+ytnePExNPYNUzn/QxDIzmWgxj6RHM8wWQ62lVXV6hkr47T0saLoH17F9Ijffxl551Fs1ub7Mwbh1/ckWt/VeOqfdJUwSzQE9gLBTIG6mVn4W7Yc7YwTaBJV5PWUYS/z5rWvDN/5/WLaJBE8bq/pP0kswg1h97gNMABZmS+YW9olDrMghp6WRIilJtxNx2XEnGt23sAAA" }; const esc = (s) => String(s == null ? "" : s).replace(/[&<>"']/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c])); const CSS = ` :host{all:initial} .root{ --bg:oklch(18% .012 265);--muted:oklch(23% .012 265);--raise:oklch(26% .014 265);--fg:oklch(96% 0 0);--fg2:oklch(76% .005 265);--fg3:oklch(61% .008 265); --line:oklch(27% .012 265);--line2:oklch(37% .012 265);--accent:#7d97ff; --brand:#4a6cf0;--brand-strong:#5b7bf5;--brand-fg:#fff;--brand-subtle:rgb(74 108 240/.28);--toggle-on:#4a6cf0; --ok:oklch(72% .15 150);--warn:oklch(78% .14 75);--err:oklch(70% .17 25); --r-ctl:14px;--r-panel:26px;--ease:cubic-bezier(.22,1,.36,1);--ease-in:cubic-bezier(.16,1,.3,1); --shadow:0 24px 56px oklch(0% 0 0/.32),0 4px 12px oklch(0% 0 0/.18); font-family:Geist,Inter,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.4;letter-spacing:-.01em;color:var(--fg); position:fixed;z-index:2147483000;right:20px;bottom:20px;color-scheme:dark; } *{box-sizing:border-box;margin:0;padding:0;font:inherit;color:inherit;letter-spacing:inherit} button{cursor:pointer;border:0;background:none} .card{display:flex;flex-direction:column;max-height:calc(100vh - 24px);width:348px;background:var(--bg);border:1px solid var(--line);border-radius:var(--r-panel);box-shadow:var(--shadow);overflow:hidden; transform-origin:bottom right} .card.enter,.fab.enter{animation:in .24s var(--ease-in)} @keyframes in{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}} .card{position:relative} .head{position:relative;display:flex;align-items:flex-start;gap:10px;padding:16px 16px 6px;cursor:grab;user-select:none;min-height:64px} .head:active{cursor:grabbing} .peek{position:absolute;right:36px;top:6px;height:66px;width:auto;pointer-events:none;filter:drop-shadow(0 6px 14px oklch(0% 0 0/.35))} .title{flex:1;min-width:0;padding-right:96px} .title b{display:block;font-family:"Noto Serif SC","Source Han Serif SC","Songti SC","STSong",serif;font-weight:500;font-size:17px;letter-spacing:.03em} .title span{display:flex;align-items:center;gap:6px;margin-top:3px;color:var(--fg2);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .title span i{flex:none;width:6px;height:6px;border-radius:50%;background:var(--fg3)} .title span.run i{background:var(--ok)}.title span.warn i{background:var(--warn)}.title span.err i{background:var(--err)}.title span.done i{background:var(--accent)} .head .icon{position:absolute;right:10px;top:12px} .icon{width:28px;height:28px;border-radius:10px;display:grid;place-items:center;color:var(--fg3)} .icon svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.75;fill:none;stroke-linecap:round;stroke-linejoin:round} @media (hover:hover){.icon:hover{background:var(--raise);color:var(--fg)}} .seg{display:flex;margin:6px 16px 0;padding:3px;background:var(--muted);border-radius:12px;position:relative} .seg button{flex:1;height:28px;border-radius:9px;color:var(--fg2);position:relative;z-index:1;transition:color .16s var(--ease)} .seg button.on{color:var(--fg)} .seg .hl{position:absolute;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);border-radius:9px;background:var(--raise);box-shadow:0 1px 2px oklch(0% 0 0/.25);transition:transform .26s var(--ease)} .seg.r .hl{transform:translateX(100%)} .body{padding:12px 16px 16px;overflow:auto;overscroll-behavior:contain;min-height:0} .head,.seg{flex:none} .body.run{display:flex;flex-direction:column} .body.run>*{flex:none} .body.run>.list{flex:0 1 176px;min-height:56px} .body,.list{scrollbar-width:thin;scrollbar-color:var(--line2) transparent} .hero{display:flex;align-items:center;gap:16px;margin:2px 0 14px} .hero svg{flex:none;width:72px;height:72px} .hero .trk{stroke:var(--line)}.hero .val{stroke:var(--accent);transition:stroke-dashoffset .5s var(--ease)} .hero text{fill:var(--fg);font-size:15px;font-family:Geist,Inter,-apple-system,sans-serif;font-variant-numeric:tabular-nums} .hero .k{min-width:0;flex:1} .hero small{display:block;color:var(--fg3);font-size:12px} .hero b{display:block;font-size:30px;font-weight:500;letter-spacing:-.03em;line-height:1.12;font-variant-numeric:tabular-nums;white-space:nowrap} .hero p{margin-top:3px;color:var(--fg2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .tip{min-height:18px;color:var(--fg2);font-size:12px;margin-bottom:8px;text-wrap:pretty} .tip.warn{color:var(--warn)}.tip.err{color:var(--err)} .list{height:176px;overflow:auto;overscroll-behavior:contain;margin:0 -4px 4px;padding:0 4px} .list:empty::before{content:"答题记录会显示在这里";display:block;padding:22px 12px;text-align:center;color:var(--fg3);font-size:12px} .row{display:flex;align-items:flex-start;gap:10px;padding:8px 2px;border-top:1px solid var(--line)} .row:first-child{border-top:0} .row .n{flex:none;min-width:6px;height:18px;display:flex;align-items:center;color:var(--fg3);font-size:12px;font-variant-numeric:tabular-nums} .row .n i{width:6px;height:6px;border-radius:50%;background:var(--ok)} .row.warn .n i{background:var(--warn)}.row.err .n i{background:var(--err)} .row .q{flex:1;min-width:0} .row .q p{color:var(--fg);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-all} .row .q em{display:block;font-style:normal;margin-top:3px;color:var(--accent);word-break:break-all;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden} .row.warn .q em{color:var(--warn)}.row.err .q em{color:var(--err)} .row .src{flex:none;font-size:11px;color:var(--fg3)} .btns{display:flex;gap:8px;align-items:center} .btn{white-space:nowrap} .btn{height:40px;border-radius:var(--r-ctl);padding:0 16px;font-weight:500;transition:transform .12s var(--ease),background .16s} .btn:active{transform:scale(.97)} .btn.pri{flex:1;height:44px;border-radius:999px;background:oklch(98% 0 0);color:oklch(18% .012 265)} @media (hover:hover){.btn.pri:hover{background:oklch(90% 0 0)}} .btn.round{flex:none;width:44px;height:44px;padding:0;border-radius:999px;background:var(--muted);color:var(--fg2);display:grid;place-items:center} .btn.round svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.75;fill:none;stroke-linecap:round;stroke-linejoin:round} @media (hover:hover){.btn.round:hover{background:var(--raise);color:var(--fg)}} .btn.buy{flex:none;height:40px;margin-bottom:10px;border-radius:999px;background:var(--brand);color:#fff} .perk{margin:-2px 0 10px;padding:9px 12px;border-radius:12px;background:var(--brand-subtle);color:var(--fg);font-size:12px;text-wrap:pretty} .btn.sec{background:var(--muted);color:var(--fg2)} .field{margin-bottom:10px} .field label{display:block;color:var(--fg2);font-size:12px;margin-bottom:4px} .input{width:100%;height:36px;border:1px solid var(--line);border-radius:12px;background:var(--muted);padding:0 11px;outline:none;transition:border-color .16s} .input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-subtle)} .inline{display:flex;gap:6px} .inline .input{flex:1;min-width:0} .mini{height:36px;padding:0 12px;border-radius:12px;border:1px solid var(--line);color:var(--fg2);white-space:nowrap} .grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px} .sw{display:flex;align-items:center;justify-content:space-between;padding:8px 0} .sw span{color:var(--fg)} .sw small{display:block;color:var(--fg3);font-size:11px} .sw.auto{margin:8px 0 12px;padding:12px;border-radius:16px;background:var(--muted)} .toggle{width:36px;height:22px;border-radius:999px;background:var(--line2);position:relative;flex:none;transition:background .2s var(--ease)} .toggle i{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .26s var(--ease)} .toggle.on{background:var(--toggle-on)}.toggle.on i{transform:translateX(14px)} .foot{margin-top:10px;font-size:12px;color:var(--fg3);text-align:center} .foot a{color:var(--accent);text-decoration:none} .fab{width:60px;height:60px;border-radius:22px;background:var(--bg);border:1px solid var(--line);box-shadow:var(--shadow);display:grid;place-items:center;position:relative} .fab img{width:46px;height:46px;object-fit:contain} .fab i{position:absolute;right:6px;top:6px;width:8px;height:8px;border-radius:50%;background:var(--fg3);border:2px solid var(--bg)} .fab.run i{background:var(--ok)}.fab.err i{background:var(--err)}.fab.warn i{background:var(--warn)} .grp{margin:14px 0 2px;padding-top:12px;border-top:1px solid var(--line);color:var(--fg3);font-size:12px} .acct{border:1px solid var(--line);border-radius:18px;padding:12px;margin-bottom:4px} .acct-row{display:flex;align-items:center;justify-content:space-between;gap:8px} .acct small{display:block;color:var(--fg3);font-size:12px} .acct b{font-weight:500;font-size:14px} .acct .bal{margin:12px 0} .acct .bal b{font-size:24px;letter-spacing:-.03em;font-variant-numeric:tabular-nums} .btn.wide{width:100%} .note{margin-top:8px;color:var(--fg3);font-size:12px;text-wrap:pretty} .note.err{color:var(--err)}.note.ok{color:var(--ok)} .link{margin-top:8px;color:var(--fg3);font-size:12px;text-decoration:underline;text-underline-offset:2px} .pkgs{display:grid;gap:6px} .pkg{display:flex;justify-content:space-between;align-items:center;gap:8px;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:12px;color:var(--fg);text-align:left} .pkg span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .pkg b{flex:none;font-weight:500;font-variant-numeric:tabular-nums} @media (hover:hover){.pkg:hover{background:var(--muted)}} .tabs2{display:flex;gap:4px;margin-bottom:10px;padding:3px;background:var(--muted);border-radius:12px} .tabs2 button{flex:1;height:28px;border-radius:9px;color:var(--fg2);transition:background .16s var(--ease),color .16s} .tabs2 button.on{background:var(--raise);color:var(--fg);box-shadow:0 1px 2px oklch(0% 0 0/.25)} .btn[disabled]{opacity:.55;pointer-events:none} .free{margin:2px 0 10px;padding:10px 12px;border-radius:14px;background:var(--muted)} .acct .free{margin:12px 0 0} .free-top{display:flex;justify-content:space-between;align-items:baseline} .free small{display:block;color:var(--fg3);font-size:11px} .free-top span{color:var(--fg2);font-variant-numeric:tabular-nums} .free-top b{font-size:18px;font-weight:500;color:var(--fg)} .free-bar{height:4px;border-radius:4px;background:var(--line);overflow:hidden;margin:6px 0 5px} .free-bar i{display:block;height:100%;background:var(--accent);border-radius:4px;transition:width .4s var(--ease)} .disc{margin-top:10px;color:var(--fg3);font-size:11px;text-align:center;text-wrap:pretty} .promo{display:flex;align-items:center;gap:6px;justify-content:center;margin-top:10px;padding-top:10px;border-top:1px solid var(--line);flex-wrap:wrap} .promo small{color:var(--fg3);font-size:11px;margin-right:2px} .promo-i{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 11px 0 9px;border-radius:999px;background:var(--muted);color:var(--fg2);font-size:12px} .promo-i svg{width:14px;height:14px;stroke:currentColor;stroke-width:1.75;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:none} @media (hover:hover){.promo-i:hover{background:var(--raise);color:var(--fg)}} .promo-i.on{background:var(--raise);color:var(--fg)} .qq{display:flex;gap:12px;align-items:center;margin-top:8px;padding:10px;border-radius:14px;background:var(--muted)} .qq img{width:96px;height:96px;border-radius:10px;background:#fff;object-fit:contain;flex:none} .qq small{display:block;color:var(--fg3);font-size:11px;margin-bottom:2px} .qq b{display:block;font-weight:500;font-size:15px;margin-bottom:8px;font-variant-numeric:tabular-nums} .qq .mini{height:30px} .modal{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:16px;background:oklch(12% .01 265/.72);animation:in .2s var(--ease-in)} .mbox{width:100%;padding:18px;border-radius:20px;background:var(--raise);border:1px solid var(--line2);display:grid;gap:10px} .mbox b{font-size:16px;font-weight:500} .mbox p{color:var(--fg2);font-size:13px;line-height:1.55;text-wrap:pretty;margin-bottom:4px} .mbox .btn{height:42px;border-radius:999px} .qqc{position:relative;margin-top:8px} .qqc-main{display:flex;align-items:center;gap:10px;width:100%;padding:8px 36px 8px 8px;border-radius:16px;background:linear-gradient(0deg,rgb(74 108 240/.18),rgb(74 108 240/.18)),var(--muted);text-align:left} .qqc-main img,.qqc-ico{width:40px;height:40px;border-radius:10px;background:#fff;object-fit:contain;flex:none} .qqc-ico{display:grid;place-items:center;color:#2448d9;font-weight:500;font-size:13px} .qqc-t{flex:1;min-width:0}.qqc-t b{display:block;font-weight:500;font-size:13px}.qqc-t small{display:block;color:var(--fg2);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .qqc-main em{font-style:normal;flex:none;height:28px;padding:0 12px;border-radius:999px;background:var(--brand);color:#fff;font-size:12px;display:grid;place-items:center} .qqc-x{position:absolute;right:6px;top:6px;width:24px;height:24px;border-radius:8px;color:var(--fg3);font-size:16px;line-height:1} @media (hover:hover){.qqc-x:hover{background:var(--raise);color:var(--fg)}} .qqbig{position:relative;margin-top:8px;padding:14px;border-radius:18px;background:var(--muted);display:grid;gap:8px} .qqbig>b{font-weight:500;font-size:15px}.qqbig>small{color:var(--fg3);font-size:11px;margin-top:-6px} .qqbig-row{display:flex;gap:12px;align-items:center} .qqbig-qr{width:112px;height:112px;border-radius:12px;background:#fff;object-fit:contain;flex:none} .qqbig ul{list-style:none;display:grid;gap:6px;color:var(--fg2);font-size:12px} .qqbig li{position:relative;padding-left:14px;text-wrap:pretty}.qqbig li::before{content:"";position:absolute;left:2px;top:6px;width:5px;height:5px;border-radius:50%;background:var(--accent)} .qqbig-num{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 8px 8px 12px;border-radius:12px;background:var(--bg)} .qqbig-num b{font-weight:500;font-size:16px;letter-spacing:.02em;font-variant-numeric:tabular-nums} .qqbig-num .mini{height:30px} .hidden{display:none!important} @media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}} `; const ICON = { min: '', copy: '', clear: '', }; const STATE_TEXT = { idle: ["等待题目", ""], run: ["进行中", "run"], paused: ["已暂停", "warn"], nokey: ["待配置", "warn"], error: ["出错", "err"], done: ["已完成", "done"] }; const Panel = { el: null, sr: null, st: { site: "", state: "idle", tip: "", tipLevel: "info", index: 0, total: 0, rows: [], tab: "run", min: false, acct: { mode: "login", form: {}, msg: "", level: "", busy: false, packages: null } }, /** 账号区:未登录显示登录/注册,登录后显示积分和充值。 */ acctView() { const c = cfg(), a = this.st.acct; const note = (fallback) => '
' + esc(a.msg || fallback || "") + "
"; if (c.token) { const bal = GM_getValue("xc_balance"); const pk = a.packages; if (!pk && !a.pkLoading) { a.pkLoading = true; svc("/packages").then((j) => { a.packages = j.packages || []; a.shopUrl = j.shopUrl || ""; }, () => { a.packages = []; }).then(() => { if (this.st.tab === "set") this.renderAcct(); }); } return '
已登录' + esc(c.acct) + '
' + this.freeRow() + '
剩余积分' + (bal == null ? "—" : esc(bal)) + '
' + '
' + '
' + (pk == null ? '
加载中…
' : pk.length ? pk.map((p, i) => '").join("") : '') + "
" + note("学习通每天有免费题数,用完后每答出一题扣 1 积分,没拿到答案不扣。积分在链动小铺买卡密兑换,记到当前登录的账号。") + "
"; } const m = a.mode, f = a.form; // 登录/注册的好处写在表单上面 const t = GM_getValue("xc_trial") || {}; const perkText = m === "reset" ? "" : [t.loginDaily ? "学习通每天免费 " + t.loginDaily + " 题,0 点恢复" : "", m === "register" && t.bonus ? "新注册再送 " + t.bonus + " 积分" : ""].filter(Boolean).join(";"); const perk = perkText ? '
' + (m === "register" ? "注册即领:" : "登录即领:") + esc(perkText) + "
" : ""; const label = { login: "登录", register: "注册并登录", reset: "重设密码" }[m]; return '
' + (m === "reset" ? '用邮箱重设密码' : '
') + perk + '
' + (m !== "login" ? '
' : "") + '
' + '" + note(m === "reset" ? "验证码没收到请看垃圾箱或广告邮件。" : m === "register" ? "先填邮箱点「获取验证码」,没收到请看垃圾箱或广告邮件。" : "") + (m === "login" ? '' : m === "reset" ? '' : "") + "
"; }, /** 今日免费额度(服务端开着免费时显示) */ freeInfo() { const c = cfg(); if (!c.token) return null; const f = GM_getValue("xc_free"); return f && f.enabled ? f : null; }, freeRow() { if (!cfg().token) { const t = GM_getValue("xc_trial"); if (!t || !t.enabled) return ""; const pct = t.total ? Math.round((t.left / t.total) * 100) : 0; return '
免费试用 · 仅学习通' + esc(t.left) + " / " + esc(t.total) + ' 题
只送一次' + (t.loginDaily ? ",注册登录后每天免费 " + esc(t.loginDaily) + " 题" : ",用完请注册登录") + "
"; } const f = this.freeInfo(); if (!f) return ""; const pct = f.daily ? Math.round((f.left / f.daily) * 100) : 0; return '
今日免费 · 仅学习通' + esc(f.left) + " / " + esc(f.daily) + ' 题
每天 0 点恢复,用完后再扣积分
'; }, qqItem() { const p = this.st.promo; return p && p.enabled !== false ? (p.items || []).find((x) => x.qq) : null; }, /** 答题页底部:其它产品的小按钮 + 一张小的入群卡(可以收起 7 天,点开看大二维码) */ promoView() { const p = this.st.promo; if (!p || !p.enabled || !p.items || !p.items.length) return ""; const links = p.items.filter((x) => !x.qq); const q = this.qqItem(); const hidden = Number(GM_getValue("xc_qqHide", 0)) > Date.now(); // 产品按钮放在入群卡上面:面板矮的时候二维码卡展开也不会把它们挤到看不见的地方 let html = links.length ? '
' + links.map((x) => '").join("") + (q && hidden ? '" : "") + "
" : ""; if (q && this.st.qqOpen) html += this.qqCard(q, true); else if (q && !hidden) html += '
'; return html; }, /** 大入群卡:二维码 + 群号 + 进群好处 */ qqCard(q, closable) { return '
' + (closable ? '' : "") + '加入小柴 QQ 群' + esc(q.desc || "") + "" + '
' + (q.img ? 'QQ 群二维码' : "") + '
    ' + (q.perks || []).map((t) => "
  • " + esc(t) + "
  • ").join("") + "
" + '
群号 ' + esc(q.qq) + '
' + '' + (q.img ? "手机 QQ 扫一扫二维码,或复制群号在 QQ 里搜索加入" : "复制群号,在 QQ 里搜索加入") + "
"; }, /** 面板内的确认弹窗:返回 Promise */ ask(modal) { return new Promise((resolve) => { this.st.modal = Object.assign({}, modal, { resolve }); this.render(); }); }, askConsent() { return this.ask({ title: "开启全自动交卷?", text: "小柴答题用 AI 作答,正确率达不到 100%。开启后,章节测验答完会直接用 AI 的答案自动提交,提交后一般不能再改,可能会错几道题、影响成绩。", ok: "我已了解,开启", cancel: "先不开,我自己检查后提交", }); }, modalView() { const m = this.st.modal; if (!m) return ""; return '"; }, closeModal(ok) { const m = this.st.modal; this.st.modal = null; this.render(); if (m && m.resolve) m.resolve(ok); }, /** 看课的测验 iframe 要交卷但客户还没表态时,由它发消息过来,这里弹窗问 */ async consentFromStudy() { if (this.st.modal || cfg().submitConsent !== undefined) return; const ok = await this.askConsent(); saveCfg({ submitConsent: ok }); GM_setValue("xc_needConsent", 0); this.st.tip = ok ? "已同意自动交卷,继续看课" : "不自动交卷:测验答完后请自己检查并提交"; this.st.tipLevel = ok ? "info" : "warn"; this.render(); }, collectForm() { this.el.querySelectorAll("[data-f]").forEach((i) => (this.st.acct.form[i.dataset.f] = i.value.trim())); }, async acctAction(a, btn) { const s = this.st, A = s.acct; this.collectForm(); const f = A.form; const say = (msg, level) => { A.msg = msg; A.level = level || ""; this.render(); }; const busy = (v) => { A.busy = v; }; try { if (a === "login" || a === "register" || a === "reset") { if (!f.account || !f.password) return say("请填写邮箱和密码", "err"); if (a === "register" && !f.code) return say("请先点「获取验证码」,把邮箱收到的 6 位验证码填进来", "err"); busy(true); say("请稍候…"); this.render(); const path = a === "login" ? "/login" : a === "register" ? "/register" : "/reset-password"; const j = await svc(path, { account: f.account, password: f.password, code: f.code || "" }); saveCfg({ token: j.token, acct: j.account.phone || j.account.email, mode: "account" }); A.form = {}; A.mode = "login"; A.packages = null; A.pkLoading = false; say(a === "register" ? "注册成功。学习通每天有免费题数" + (j.bonus ? ",另送你 " + j.bonus + " 积分" : "") + ",可以直接开始。" : "登录成功", "ok"); if (s.state === "nokey") s.state = "idle"; GM_setValue("xc_needLogin", 0); await this.refreshBalance(); } else if (a === "sendcode") { if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f.account || "")) return say("请先填写正确的邮箱", "err"); btn.textContent = "发送中"; const j = await svc("/send-code", { email: f.account, purpose: A.mode === "reset" ? "reset" : "register" }); say(j.message || "验证码已发送,没收到请看垃圾箱", "ok"); } else if (a === "logout") { try { await svc("/logout", {}); } catch (e) {} saveCfg({ token: "", acct: "" }); GM_setValue("xc_balance", null); GM_setValue("xc_free", null); A.packages = null; A.pkLoading = false; say(""); s.state = "idle"; this.refreshBalance().catch(() => {}); } else if (a === "refresh") { btn.textContent = "刷新中"; await this.refreshBalance(true); say("已刷新", "ok"); } else if (a === "redeem") { if (!f.rcode) return say("先粘贴卡密", "err"); busy(true); say("正在兑换…"); this.render(); const j = await svc("/redeem", { code: f.rcode }); if (j.balance) GM_setValue("xc_balance", j.balance.available); A.form.rcode = ""; say("兑换成功,到账 " + j.points + " 积分,已记到当前账号", "ok"); GM_setValue("xc_needBuy", 0); if (s.tipLevel === "warn") { s.tip = "积分已到账,回「答题」页点「开始」接着答"; s.tipLevel = "info"; } if (s.state === "nokey") s.state = "idle"; } } catch (e) { say(e.message, "err"); } busy(false); this.render(); }, /** 打开链动小铺商品页,买完拿卡密回来兑换 */ buy(which) { const A = this.st.acct; const p = which === "shop" ? null : (A.packages || [])[Number(which)]; const url = (p && p.url) || A.shopUrl; if (!url) { A.msg = "小铺链接还没配置,请联系客服"; A.level = "err"; return this.render(); } try { GM_openInTab(url, { active: true }); } catch (e) { window.open(url, "_blank", "noopener"); } A.msg = "已打开链动小铺。付款后复制卡密,回来粘贴到「兑换卡密」。"; A.level = "ok"; this.collectForm(); this.render(); }, /** 只重画账号区,不动设置页里其它正在填的输入框 */ renderAcct() { const box = this.el && this.el.querySelector(".acct"); if (!box) return; this.collectForm(); box.outerHTML = this.acctView(); this.bind(); }, async refreshBalance(fresh) { if (!cfg().token) { const j = await svc("/trial?device=" + encodeURIComponent(deviceId())); if (j.trial) GM_setValue("xc_trial", j.trial); return; } try { const j = await svc("/me" + (fresh ? "?fresh=1" : "")); if (j.balance) GM_setValue("xc_balance", j.balance.available); if (j.free) GM_setValue("xc_free", j.free); if (j.account) saveCfg({ acct: j.account.phone || j.account.email }); } catch (e) { if (e.status === 401) { this.st.state = "nokey"; } throw e; } }, handle(msg) { if (!msg || !msg[MSG_TAG] || msg.kind === "hello") return; this.seen = this.seen || new Set(); if (msg.id) { if (this.seen.has(msg.id)) return; this.seen.add(msg.id); } if (msg.site) this.st.site = msg.site; if (msg.site === "学习通自动看课") this.st.study = true; // 课程页里测验 iframe 会报自己的名字,面板仍按看课状态显示 if (!this.el) this.mount(); if (!this.el) { (this.queue = this.queue || []).push(msg); return; } if (msg.kind === "tip") { this.st.tip = msg.text; this.st.tipLevel = msg.level; } if (msg.kind === "row") { this.st.rows.push(msg.row); } if (msg.kind === "progress") { this.st.index = msg.index; this.st.total = msg.total; } // 课程页里测验 iframe 答完会报「已完成」,那只是这一个测验完了,不覆盖看课状态;暂停、出错照常显示 if (msg.kind === "state" && !(this.st.study && msg.site !== "学习通自动看课" && /^(done|idle|run)$/.test(msg.state))) this.st.state = msg.state; if (msg.kind === "now") this.st.now = msg.now || null; if (msg.kind === "consent") setTimeout(() => this.consentFromStudy(), 0); // 设置页正在填写时不重画表单,只更新顶部状态,否则输入的内容会被清掉 if (this.st.tab === "set" && !this.st.min && this.el.querySelector(".card")) this.updateHeader(); else this.render(); }, updateHeader() { const s = this.st, el = this.el; const [stText, stCls] = STATE_TEXT[s.state] || STATE_TEXT.idle; const face = s.state === "done" ? IMG.wow : s.state === "paused" || s.state === "nokey" ? IMG.sleep : IMG.happy; const line = el.querySelector(".title span"); const text = (s.study ? "学习通自动看课" : s.site || "未识别到题目") + " · " + stText; if (line && (line.className !== stCls || line.textContent !== text)) { line.className = stCls; line.innerHTML = "" + esc(text); } const img = el.querySelector(".head .peek"); if (img && img.getAttribute("src") !== face) img.setAttribute("src", face); }, mount() { if (!document.body) { document.addEventListener("DOMContentLoaded", () => this.mount(), { once: true }); return; } const host = document.createElement("xiaochai-dati"); const sr = host.attachShadow({ mode: "open" }); sr.innerHTML = "
'; document.documentElement.appendChild(host); this.el = sr.querySelector(".root"); this.sr = sr; this.st.min = Boolean(GM_getValue("xc_min", false)); const pos = GM_getValue("xc_pos"); if (pos) { this.el.style.right = pos.r + "px"; this.el.style.bottom = pos.b + "px"; } this.render(); if (GM_getValue("xc_needConsent", 0) && cfg().submitConsent === undefined) setTimeout(() => this.consentFromStudy(), 500); svc("/promo").then((j) => { this.st.promo = j.promo; if (!this.st.min && this.st.tab === "run") this.render(); }, () => {}); // 打开页面时顺手刷新一次积分(不阻塞,失败不提示) this.refreshBalance().then(() => { if (!this.st.min && !(this.st.tab === "set" && this.el.querySelector("[data-f]"))) this.render(); }, () => {}); const q = this.queue || []; this.queue = []; q.forEach((m) => this.handle(m)); }, render() { const s = this.st, el = this.el; const [stText, stCls] = STATE_TEXT[s.state] || STATE_TEXT.idle; const face = s.state === "done" ? IMG.wow : s.state === "paused" || s.state === "nokey" ? IMG.sleep : IMG.happy; const enter = this.lastMin !== s.min ? " enter" : ""; this.lastMin = s.min; if (s.min) { el.innerHTML = ''; return this.bind(); } const c = cfg(); const pct = s.total ? Math.round((s.index / s.total) * 100) : 0; const isPaused = paused(); const bal = c.token ? GM_getValue("xc_balance") : null; const now = s.now; const needBuy = Boolean(isPaused && c.token && GM_getValue("xc_needBuy", 0)); const needLogin = !c.token && GM_getValue("xc_needLogin", 0); const ringPct = now && typeof now.pct === "number" ? Math.round(Math.min(1, Math.max(0, now.pct)) * 100) : pct; const R = 30, CIRC = 2 * Math.PI * R; const big = now && now.big ? now.big : s.total ? s.index + " / " + s.total : "—"; const label = now && now.label ? now.label : s.total ? "答题进度" + (bal != null ? " · 积分 " + bal : "") : bal != null ? "剩余积分 " + bal : "等待开始"; const sub = now && now.sub ? now.sub : s.tip || "打开作业、考试或课程页面后会自动开始"; const runView = '
' + '
' + esc(label) + "" + esc(big) + "

" + esc(sub) + "

" + // 积分不足时固定提示原因,不让看课模块的「已暂停」提示盖掉 (needBuy ? '
积分不足,已暂停。兑换后点「开始」接着答
' : needLogin ? '
' + esc(typeof needLogin === "string" ? needLogin : "试用题数已用完") + ",登录后点「开始」
" : (s.tipLevel === "warn" || s.tipLevel === "err") && s.tip ? '
' + esc(s.tip) + "
" : "") + (needBuy ? '' : needLogin ? '' : "") + this.freeRow() + '
' + s.rows.slice().reverse().map((r) => '
' + (r.index === "·" ? "" : esc(r.index)) + '

' + esc(r.question) + "

" + (r.answer ? "" + esc(r.answer) + "" : "") + '
' + esc(r.src || "") + "
").join("") + "
" + (s.study || /学习通/.test(s.site) ? '
全自动看视频、答测验并自动提交,再进入下一节
' : "") + '
' + '' + '
" + '

AI 答题正确率达不到 100%,交卷前请自己检查一遍。

' + this.promoView(); const setView = this.acctView() + '
答题
' + '
' + '
' + '
答完自动下一页整页答完后切到下一题或下一页,不会自动交卷
' + '
识别题目图片需要模型支持看图
' + '
学习通自动看课
' + '
自动完成任务点视频、文档、章节测验,完成后自动切下一节
' + '
章节测验自动交卷开了「全自动」时总会提交;只在每题都拿到答案时提交
' + '
' + '
其他
' + '
' + '
' + (this.qqItem() ? '
交流群
' + this.qqCard(this.qqItem(), false) : ""); const oldList = el.querySelector(".list"), oldBody = el.querySelector(".body"); const keep = { list: oldList ? oldList.scrollTop : 0, body: oldBody ? oldBody.scrollTop : 0, tab: this.lastTab }; this.lastTab = s.tab; el.innerHTML = '
' + '
小柴答题' + esc((s.study ? "学习通自动看课" : s.site || "未识别到题目") + " · " + stText) + "
" + '
" + '
' + '
' + (s.tab === "run" ? runView : setView) + "
" + this.modalView() + "
"; if (keep.tab === s.tab) { const l = el.querySelector(".list"), b = el.querySelector(".body"); if (l) l.scrollTop = keep.list; if (b) b.scrollTop = keep.body; } this.bind(); }, bind() { const el = this.el, s = this.st; const card = el.querySelector(".card"); if (card) card.style.maxHeight = Math.max(240, innerHeight - (parseFloat(el.style.bottom) || 20) - 12) + "px"; el.querySelectorAll("[data-tab]").forEach((b) => (b.onclick = () => { s.tab = b.dataset.tab; this.render(); })); el.querySelectorAll("[data-t]").forEach((b) => (b.onclick = () => b.classList.toggle("on"))); el.querySelectorAll("[data-am]").forEach((b) => (b.onclick = () => { this.collectForm(); s.acct.mode = b.dataset.am; s.acct.msg = ""; s.acct.level = ""; this.render(); })); el.querySelectorAll("[data-modal]").forEach((b) => (b.onclick = () => this.closeModal(b.dataset.modal === "ok"))); el.querySelectorAll("[data-pk]").forEach((b) => (b.onclick = () => this.buy(b.dataset.pk))); el.querySelectorAll("[data-promo]").forEach((b) => (b.onclick = () => { const id = b.dataset.promo, item = ((s.promo || {}).items || []).find((x) => x.id === id); const u = SVC + "/go/" + encodeURIComponent(id); if (item && item.qq) { // QQ 群:在面板里展开群号和二维码,只记一次点击 s.promoOpen = s.promoOpen === id ? "" : id; if (s.promoOpen) gmRequest({ url: u }).catch(() => {}); return this.render(); } try { GM_openInTab(u, { active: true }); } catch (e) { window.open(u, "_blank", "noopener"); } })); const qqTrack = () => { if (!this.qqTracked) { this.qqTracked = true; gmRequest({ url: SVC + "/go/qq" }).catch(() => {}); } }; el.querySelectorAll("[data-qqopen]").forEach((b) => (b.onclick = () => { s.qqOpen = true; GM_setValue("xc_qqHide", 0); qqTrack(); this.render(); })); el.querySelectorAll("[data-qqclose]").forEach((b) => (b.onclick = () => { s.qqOpen = false; this.render(); })); el.querySelectorAll("[data-qqhide]").forEach((b) => (b.onclick = () => { GM_setValue("xc_qqHide", Date.now() + 7 * 86400000); this.render(); })); el.querySelectorAll(".qqbig-qr, .qqc img").forEach((img) => (img.onerror = () => img.remove())); // 网站不让加载外链图片时只显示群号 el.querySelectorAll("[data-qqcopy]").forEach((b) => (b.onclick = async () => { qqTrack(); const n = b.dataset.qqcopy; try { await navigator.clipboard.writeText(n); } catch (e) { const t = document.createElement("textarea"); t.value = n; this.sr.appendChild(t); t.select(); document.execCommand("copy"); t.remove(); } b.textContent = "已复制,去 QQ 搜索加群"; })); el.querySelectorAll("[data-f]").forEach((i) => (i.onkeydown = (e) => { if (e.key === "Enter") { const go = el.querySelector('[data-a="' + (i.dataset.f === "rcode" ? "redeem" : s.acct.mode) + '"]'); if (go) go.click(); } })); el.querySelectorAll("[data-a]").forEach((b) => (b.onclick = async (e) => { const a = b.dataset.a; if (["login", "register", "reset", "sendcode", "logout", "refresh", "redeem"].includes(a)) return this.acctAction(a, b); if (a === "min" || a === "expand") { if (this.dragged) return; s.min = a === "min"; GM_setValue("xc_min", s.min); this.render(); } if (a === "toggle") { GM_setValue("xc_paused", !paused()); if (s.state === "run" || s.state === "paused") s.state = paused() ? "paused" : "run"; this.render(); } if (a === "clear") { s.rows = []; this.render(); } if (a === "copy") { const text = s.rows.map((r) => { const lines = [r.index + ". " + (TYPE_NAMES[r.type] ? "【" + TYPE_NAMES[r.type] + "】" : "") + r.question]; (r.options || []).forEach((o, i) => lines.push(" " + LETTERS[i] + ". " + o)); lines.push(" 答案:" + r.answer + (r.src ? "(" + r.src + ")" : "")); return lines.join("\n"); }).join("\n\n"); const done = () => { s.tip = s.rows.length ? "已复制 " + s.rows.length + " 条记录" : "还没有记录可复制"; s.tipLevel = "info"; this.render(); }; try { await navigator.clipboard.writeText(text); done(); } catch (err) { const ta = document.createElement("textarea"); ta.value = text; ta.style.cssText = "position:fixed;left:-9999px"; this.sr.appendChild(ta); ta.select(); document.execCommand("copy"); ta.remove(); done(); } } if (a === "buy") { s.tab = "set"; return this.render(); } // 账号区在设置页最上面:选套餐、兑换卡密 if (a === "autoChapter") { if (!cfg().autoChapter && cfg().submitConsent !== true) { const ok = await this.askConsent(); if (!ok) { s.tip = "没有开启全自动"; s.tipLevel = "info"; return this.render(); } saveCfg({ submitConsent: true, autoChapter: true }); } else saveCfg({ autoChapter: !cfg().autoChapter }); s.tip = cfg().autoChapter ? "已开全自动:看视频、答测验并提交后进入下一节" : "已关全自动:本节完成后停下"; s.tipLevel = "info"; this.render(); return; } if (a === "save") { this.collectForm(); const sub = el.querySelector('[data-t="autoSubmit"]'); if (sub && sub.classList.contains("on") && !cfg().autoSubmit && cfg().submitConsent !== true) { if (await this.askConsent()) saveCfg({ submitConsent: true }); else { const again = this.el.querySelector('[data-t="autoSubmit"]'); if (again) again.classList.remove("on"); } } this.collect(); s.tab = "run"; if (s.state === "nokey") s.state = "idle"; s.tip = "已保存"; s.tipLevel = "info"; this.render(); } })); this.drag(el.querySelector("[data-drag]") || el.querySelector(".fab")); }, collect() { const el = this.el, p = {}; el.querySelectorAll("[data-k]").forEach((i) => { const k = i.dataset.k; p[k] = i.type === "number" ? Number(i.value) || 0 : i.value.trim(); }); el.querySelectorAll("[data-t]").forEach((t) => (p[t.dataset.t] = t.classList.contains("on"))); saveCfg(p); }, drag(handle) { if (!handle) return; handle.onpointerdown = (e) => { if (e.target.closest("button") && !handle.classList.contains("fab")) return; const el = this.el, sx = e.clientX, sy = e.clientY; const r0 = parseFloat(el.style.right || 20), b0 = parseFloat(el.style.bottom || 20); this.dragged = false; const move = (ev) => { const dx = ev.clientX - sx, dy = ev.clientY - sy; if (Math.abs(dx) + Math.abs(dy) > 4) this.dragged = true; el.style.right = Math.min(Math.max(0, r0 - dx), innerWidth - 60) + "px"; el.style.bottom = Math.min(Math.max(0, b0 - dy), innerHeight - 60) + "px"; }; const up = () => { removeEventListener("pointermove", move); removeEventListener("pointerup", up); GM_setValue("xc_pos", { r: parseFloat(el.style.right), b: parseFloat(el.style.bottom) }); setTimeout(() => (this.dragged = false), 0); }; addEventListener("pointermove", move); addEventListener("pointerup", up); }; }, }; if (IS_TOP) { window.addEventListener("message", (e) => Panel.handle(e.data)); // 顶层脚本可能比 iframe 里的晚启动:广播一次 hello,让已经在答题的 frame 把之前的消息重发一遍 const hello = () => { const walk = (w) => { for (let i = 0; i < w.frames.length; i++) { try { w.frames[i].postMessage({ [MSG_TAG]: 1, kind: "hello" }, "*"); walk(w.frames[i]); } catch (e) {} } }; walk(window); }; hello(); window.addEventListener("load", hello); } else { window.addEventListener("message", (e) => { if (e.data && e.data[MSG_TAG] && e.data.kind === "hello" && sentLog.length) sentLog.forEach((m) => { try { window.top.postMessage(m, "*"); } catch (err) {} }); }); } /* ---------- 答题引擎 ---------- * 每个平台用 site({...}) 注册一条适配规则: * name 平台名;match 是否命中(布尔或函数);hook 命中后立即执行(返回 true 中断); * init 开始前执行(返回 true 中断);intv 轮询条件,满足后才开始; * root 每道题的根元素;elements: { question, options, $options, type, answer } 子元素选择器; * wrap(obj) 整理题目数据(返回布尔表示这题还没准备好,稍后重试); * ignore_click($opt, type) 该选项当前是否已选中;fill(type, answer, $opt) 填写文字题; * fillFinish(result) 每题答完;finished(autoNext) 整页答完,返回 true 表示重新扫描本页。 */ const SITES = []; function site(opt) { SITES.push(opt); } function cleanQuestion(q) { return q.replace(/^\d+、/, "").replace(/[((](\d+\s?(\.\d+)?分)[))]$/, "").replace(/^((\d+.(\s+)?)?)[\[((【](.*?)[】))\]]/, "").trim(); } async function extract($item, sel, wrap) { const el = sel.elements; if (el.type && el.type.includes("input[name^=type]:eq")) el.type = "input[name^=type]:eq(" + X.i + ")"; const q =fmt(imgText($item.find(el.question))); const d = { $item, question_text: $item.find(el.question).text(), question: cleanQuestion(q), $options: el.$options ? $item.find(el.$options) : $(), options: el.options ? $.map($item.find(el.options), (o) => fmt(imgText(o)).replace(/^[A-Ga-g][.、]/, "").trim()) : [], }; if (el.type) { const $t = $item.find(el.type); const byText = qtype($t.text()); const val = $t.val(); d.type = byText !== undefined ? byText : isNaN(val) ? val : parseInt(val); } else d.type = guessType(d.$options); if (el.answer) { const raw = imgText($item.find(el.answer)) || $item.find(el.answer).val(); if (raw) d.answer = d.type === 0 || d.type === 1 ? (String(raw).match(/[A-G]/gi) || [raw]) : [raw]; } if (d.type === 3 && d.options.length === 0) d.options = ["正确", "错误"]; const r = await wrap(d); if (typeof r === "boolean") return undefined; if (typeof d.type === "string" && !isNaN(d.type)) d.type = parseInt(d.type); if (d.answer != null && !Array.isArray(d.answer)) d.answer = [d.answer]; if (Array.isArray(d.answer)) d.answer = d.answer.filter((a) => a !== "" && a != null).map(String); if (d.type === undefined && d.options.length) d.type = 0; return d; } async function clickTo(indices, d, ignoreClick) { const delay = cfg().fillDelay; for (let i = 0; i < d.$options.length; i++) { const $o = d.$options.eq(i); const want = indices.includes(i); if (want !== Boolean(ignoreClick($o, d.type))) { $o.get(0).click(); await sleep(delay); } } } /** 拿到答案文字后填进页面,返回给面板显示的结果 */ async function apply(answers, d, fill, ignoreClick) { if (TEXT_TYPES.includes(d.type) || (!d.options.length && d.$options.length)) { const list = answers.slice(0, Math.max(1, d.$options.length)); for (let i = 0; i < list.length; i++) if (typeof fill === "function") await fill(d.type, list[i], d.$options.eq(i)); return { type: d.type, ok: true, ans: answers.join(" / ") }; } let idx = answersToIndices(answers, d.options, d.type); if (d.type === 0 || d.type === 3) idx = idx.slice(0, 1); if (!idx.length) return { type: d.type, ok: false, ans: answers.join(" / ") }; await clickTo(idx, d, ignoreClick); return { type: d.type, ok: true, ans: idx.map((i) => LETTERS[i] + (d.options[i] ? " " + d.options[i] : "")).join(";") }; } async function getAnswers(d) { if (d.answer && d.answer.length) return { list: d.answer, src: "页面" }; const cached = cacheGet(d); if (cached) return { list: cached, src: "缓存" }; const fromAdapter = await askAdapter(d); if (fromAdapter.length) return { list: fromAdapter, src: "题库" }; const list = await askAI(d); if (list.length) cachePut(d, list); return { list, src: "AI" }; } async function runSite(opt) { const noop = () => {}; const wrap = opt.wrap || noop, fill = opt.fill || noop, finished = opt.finished || noop, fillFinish = opt.fillFinish || noop; const ignoreClick = opt.ignore_click || (() => false); const sel = { root: opt.root, elements: opt.elements || {} }; ui.ready(opt.name); // 同一页里提前并发向模型要答案(最多 concurrency 道),拿到后仍按题号顺序点选/填写。 // 有 fillFinish 的平台是“一题一页、答完点下一题”,后面的题还没显示,只能一次一题。 const loop = async () => { X.index = 0; const items = $(sel.root); if (!items.length) { ui.tip("没找到题目,等页面加载完再试"); return; } const conc = opt.fillFinish ? 1 : Math.min(8, Math.max(1, Number(cfg().concurrency) || 1)); ui.state(paused() ? "paused" : "run"); ui.progress(0, items.length); const queue = []; // { i, d, p, fails } let next = 0, done = 0, bad = 0; const ask = (d) => getAnswers(d).then((v) => ({ v }), (e) => ({ e })); const prefetch = async () => { while (queue.length < conc && next < items.length) { X.index = next + 1; const d = await extract($(items[next]), sel, wrap); if (!d) break; // 这题还没准备好,稍后再试 next++; queue.push({ i: next, d, p: ask(d), fails: 0 }); } }; let lastFill = 0; while (true) { if (paused()) { ui.state("paused"); await sleep(1000); continue; } try { await prefetch(); } catch (e) { console.warn("[小柴答题] 读取题目失败", e); } if (!queue.length) { if (next >= items.length) { const autoNext = cfg().autoNext; X.index = items.length; const again = await finished(autoNext); // 告诉看课模块:这一页答完了,有几题没拿到可靠答案 document.documentElement.dataset.xcDone = "1"; document.documentElement.dataset.xcBad = String(bad); ui.state("done"); ui.tip(again ? "本页答完,正在切换" : autoNext ? "全部答完,请检查后自己提交" : "本页答完,请手动切换或检查提交"); if (again) setTimeout(loop, 300); return; } await sleep(1000); continue; } const head = queue[0]; ui.state("run"); ui.tip(conc > 1 ? "正在答第 " + head.i + " 题(同时在问 " + queue.length + " 道)" : "正在答第 " + head.i + " 题"); const res = await head.p; if (res.e) { const e = res.e; // 积分不足 / 登录失效:暂停在这一题,兑换积分或重新登录后点「开始」接着答,不算失败 if (e.status === 402 || e.status === 401) { GM_setValue("xc_paused", true); ui.state("paused"); const needLogin = e.status === 401 && e.data && e.data.needLogin; if (needLogin) GM_setValue("xc_needLogin", e.message || "试用题数已用完"); ui.tip(e.status === 402 ? (e.message || "积分不足") + ",兑换后点「开始」" : needLogin ? e.message + ",登录后点「开始」" : "登录已失效:到「设置」里重新登录,再点「开始」", "warn"); if (e.status === 402) { GM_setValue("xc_needBuy", 1); GM_setValue("xc_balance", e.data && e.data.balance ? e.data.balance.available : 0); if (e.data && e.data.free) GM_setValue("xc_free", e.data.free); } head.p = (async () => { while (paused()) await sleep(1000); return ask(head.d); })(); continue; } head.fails++; ui.state("error"); ui.tip("第 " + head.i + " 题:" + (e.message || String(e)) + (head.fails > 1 ? "(第 " + head.fails + " 次重试)" : ""), "err"); console.warn("[小柴答题]", location.host, e); if (head.fails >= 3) { queue.shift(); done++; bad++; ui.progress(done, items.length); ui.push({ index: head.i, question: "第 " + head.i + " 题", answer: "多次失败,已跳过", status: "err", src: "" }); } else { await sleep(3000); head.p = ask(head.d); } continue; } // 按设置的间隔填写,模拟正常作答节奏 const gap = Math.max(0, Number(cfg().delay) || 0) * 1000 - (Date.now() - lastFill); if (gap > 0) await sleep(gap); if (paused()) continue; queue.shift(); X.index = head.i; const d = head.d, { list, src } = res.v; try { const r = await apply(list, d, fill, ignoreClick); lastFill = Date.now(); done++; if (!r.ok) bad++; ui.progress(done, items.length); ui.push({ index: head.i, question: String(d.question).replace(//g, "[图]"), answer: r.ans || "没拿到答案", status: r.ok ? "ok" : "warn", src, type: d.type, options: (d.options || []).map((o) => String(o).replace(//g, "[图]")) }); await fillFinish({ type: d.type, style: r.ok ? "primary-row" : "warning-row", ans: r.ans, question: d.question }); } catch (e) { done++; bad++; ui.push({ index: head.i, question: String(d.question), answer: "填写失败:" + (e.message || e), status: "err", src }); console.warn("[小柴答题] 填写失败", e); } } }; const start = () => setTimeout(() => { if (typeof opt.init === "function" && opt.init()) return; loop(); }, 2000); if (opt.intv) waitUntil(opt.intv, start); else start(); } function boot() { if (/\/knowledge\/cards/.test(location.pathname)) { if (cfg().study) Study.run().catch((e) => console.warn("[小柴答题] 自动看课出错", e)); return; } if (Harvest.match()) { Harvest.run().catch((e) => console.warn("[小柴答题] 收集批改结果出错", e)); return; } for (const opt of SITES) { let hit = false; try { hit = typeof opt.match === "function" ? opt.match() : Boolean(opt.match); } catch (e) {} if (!hit) continue; X.matched = true; X.site = opt.name; if (typeof opt.hook === "function" && opt.hook()) return; runSite(opt); return; } } /* ---------- 读取页面接口数据 ---------- * 有的平台题目和选项藏在接口返回的 JSON 里,页面只显示乱序或加密后的内容; * 拦截页面的 JSON 解析(智慧树拦 XHR),把原始题目数据交给适配规则。只在本地读取,不上传。 */ function hookJSON(func) { if (location.host.includes("zhihuishu")) { const proto = W.XMLHttpRequest.prototype, send = proto.send; proto.send = function () { this.addEventListener("readystatechange", function () { try { if (this.readyState === 4 && typeof this.response === "string" && this.response.includes("workExamParts")) func(JSON.parse(this.response)); } catch (e) {} }, false); return send.apply(this, arguments); }; return; } const J = W.JSON, parse = J.parse; J.parse = function () { const o = parse.apply(this, arguments); try { func(o); } catch (e) {} return o; }; } /* ---------- 学习通自动完成任务点 ---------- * 在章节内容页(/knowledge/cards)里运行:按顺序处理本页任务点—— * 视频/音频:静音播放到结束(倍速可调,默认 1 倍),被暂停会续播,视频里的随堂小题交给 AI; * 文档:按学习通文档查看器的方式上报看完; * 章节测验:由答题引擎在测验 iframe 里作答,开了「自动交卷」且每题都有答案才提交; * 本页都完成后切到下一页签或下一节。 */ const Study = (() => { const log = (text, status = "ok") => ui.push({ index: "·", question: text, answer: "", status, src: "" }); const tip = (text, level) => ui.tip(text, level); function readMArg() { try { if (W.mArg && typeof W.mArg === "object") return W.mArg; } catch (e) {} for (const sc of document.querySelectorAll("script")) { const t = sc.textContent; const i = t.indexOf("mArg = {"); if (i < 0) continue; const m = t.slice(i).match(/mArg = (\{[\s\S]*?\});\s*\}\s*catch/); if (m) try { return JSON.parse(m[1]); } catch (e) {} } return null; } const frameDoc = (f) => { try { return f.contentDocument || f.contentWindow.document; } catch (e) { return null; } }; function findIn(doc, sel, depth = 3) { if (!doc) return null; const hit = doc.querySelector(sel); if (hit || depth <= 0) return hit ? { el: hit, doc } : null; for (const f of doc.querySelectorAll("iframe")) { const r = findIn(frameDoc(f), sel, depth - 1); if (r) return r; } return null; } const visible = (el) => el && el.offsetParent !== null && getComputedStyle(el).visibility !== "hidden"; const finishedBox = (box) => box && (box.classList.contains("ans-job-finished") || Boolean(box.querySelector(".ans-job-finished"))); const fmtTime = (s) => (isFinite(s) ? Math.floor(s / 60) + ":" + String(Math.floor(s % 60)).padStart(2, "0") : "--:--"); async function waitFor(fn, ms = 60000, every = 1000) { const end = Date.now() + ms; while (Date.now() < end) { let v; try { v = fn(); } catch (e) {} if (v) return v; await sleep(every); } return null; } async function holdWhilePaused() { if (!paused()) return; // 暂停状态是全局记住的(上次手动暂停、或出错/积分不足自动暂停),换页后也不会自己恢复,要明确告诉用户 log("自动看课已暂停:到「答题」页点「开始」才会开始播放", "warn"); while (paused()) { ui.state("paused"); tip("已暂停:点下方「开始」接着看课", "warn"); await sleep(1000); } log("已继续,开始看课"); } /* 视频里的随堂小题 */ async function answerVideoQuiz(doc) { const box = doc.querySelector(".ans-videoquiz"); if (!visible(box)) return false; const title = fmt((box.querySelector(".ans-videoquiz-title, .ans-videoquiz-subject, .tkItem_title") || box).innerText || ""); const labels = [...box.querySelectorAll(".ans-videoquiz-opt label")]; if (!labels.length) return false; const multi = Boolean(box.querySelector('input[type="checkbox"]')); const options = labels.map((l) => fmt(l.innerText).replace(/^[A-Ha-h][.、\s]\s*/, "")); const isJudge = options.length === 2 && options.some((o) => /^(对|正确|√)$/.test(o)); const d = { question: title, options, type: isJudge ? 3 : multi ? 1 : 0, $options: $() }; let order = []; try { order = answersToIndices(await askAI(d), options, d.type); } catch (e) {} const tried = [order, ...options.map((_, i) => [i])]; for (const pick of tried) { if (!pick.length) continue; labels.forEach((l, i) => { const inp = l.querySelector("input") || l.previousElementSibling; if (inp && inp.checked !== pick.includes(i)) l.click(); }); await sleep(400); const submit = box.querySelector("#videoquiz-submit, .ans-videoquiz-submit"); if (submit) submit.click(); await sleep(1500); const cont = doc.querySelector("#videoquiz-continue, .ans-videoquiz-continue"); if (visible(cont)) { cont.click(); await sleep(800); } if (!visible(doc.querySelector(".ans-videoquiz"))) { log("视频小题已作答:" + title.slice(0, 30)); return true; } } log("视频小题没答过去,请手动处理:" + title.slice(0, 30), "warn"); return true; } /** 让页面一直以为自己在前台:切标签、最小化时学习通不会因此暂停视频 */ function keepVisible(win) { try { if (!win || win.__xcVisible) return; win.__xcVisible = true; const d = win.document; Object.defineProperty(d, "hidden", { configurable: true, get: () => false }); Object.defineProperty(d, "visibilityState", { configurable: true, get: () => "visible" }); d.hasFocus = () => true; const stop = (e) => e.stopImmediatePropagation(); ["visibilitychange", "webkitvisibilitychange", "blur", "pagehide", "freeze"].forEach((n) => { win.addEventListener(n, stop, true); d.addEventListener(n, stop, true); }); } catch (e) {} } async function doMedia(box, att, pos) { const name = (att.property && att.property.name) || "视频"; const iframe = box.querySelector("iframe"); tip("正在加载:" + name); const found = await waitFor(() => findIn(frameDoc(iframe), "video, audio"), 60000); if (!found) { log("没加载出播放器,跳过:" + name, "warn"); return; } const media = found.el, doc = found.doc; const rate = Math.min(2, Math.max(1, Number(cfg().studyRate) || 1)); media.muted = true; const keepRate = () => { if (media.playbackRate !== rate) try { media.playbackRate = rate; } catch (e) {} }; keepRate(); const play = () => { if (!media.ended) media.play().catch(() => {}); }; media.addEventListener("ratechange", keepRate); [window, doc.defaultView].forEach(keepVisible); try { keepVisible(window.top); } catch (e) {} // 被暂停立刻续播(事件在后台标签也会触发,不受定时器节流影响);视频小题弹出或用户点了暂停时不续 media.addEventListener("pause", () => { if (media.ended || paused() || visible(doc.querySelector(".ans-videoquiz"))) return; setTimeout(play, 300); }); play(); log("开始播放:" + name + (rate > 1 ? "(" + rate + " 倍速)" : "")); let lastT = -1, stuck = 0; while (!media.ended && !finishedBox(box)) { await holdWhilePaused(); ui.state("run"); if (visible(doc.querySelector(".ans-videoquiz"))) { tip("视频里有小题,正在作答"); await answerVideoQuiz(doc); play(); } else if (media.paused) play(); tip(name + " " + fmtTime(media.currentTime) + " / " + fmtTime(media.duration)); ui.now({ label: (pos || "视频") + " · 共 " + fmtTime(media.duration) + (rate > 1 ? " · " + rate + " 倍速" : ""), big: fmtTime(media.currentTime), sub: name.replace(/\.(mp4|mp3|flv|m4a)$/i, ""), pct: media.duration ? media.currentTime / media.duration : 0 }); stuck = Math.abs(media.currentTime - lastT) < 0.1 ? stuck + 1 : 0; lastT = media.currentTime; if (stuck >= 60) { log("播放卡住超过 2 分钟,跳过:" + name, "warn"); return; } await sleep(2000); } const ok = await waitFor(() => finishedBox(box), 20000); ui.now(null); log((ok ? "看完:" : "播放结束,任务点还没变成已完成:") + name, ok ? "ok" : "warn"); } async function doDocument(box, att, margs) { const name = (att.property && att.property.name) || "文档"; const p = att.property || {}, def = margs.defaults || {}; const jobid = p.jobid || p._jobid || att.jobid; if (!jobid || !att.jtoken) { log("文档缺少参数,跳过:" + name, "warn"); return; } const url = location.origin + "/ananas/job/document?jobid=" + encodeURIComponent(jobid) + "&knowledgeid=" + encodeURIComponent(def.knowledgeid) + "&courseid=" + encodeURIComponent(def.courseid) + "&clazzid=" + encodeURIComponent(def.clazzId) + "&jtoken=" + encodeURIComponent(att.jtoken) + "&_dc=" + Date.now(); try { const r = await fetch(url, { credentials: "include" }); const j = await r.json().catch(() => ({})); log((j.status ? "文档已完成:" : "文档没完成(" + (j.msg || r.status) + "):") + name, j.status ? "ok" : "warn"); } catch (e) { log("文档请求失败:" + name, "warn"); } await sleep(1500); } const textOf = (el) => (el.innerText || el.value || "").trim(); const shownEl = (el) => el && el.getClientRects().length > 0 && (el.ownerDocument.defaultView || window).getComputedStyle(el).visibility !== "hidden"; /** 从最外层页面开始收集所有能访问的文档(确认框可能在任意一层 iframe 里) */ function allDocs() { const out = []; const walk = (d, depth) => { if (!d || out.includes(d) || depth > 5) return; out.push(d); d.querySelectorAll("iframe").forEach((f) => { try { walk(f.contentDocument, depth + 1); } catch (e) {} }); }; let topDoc = null; try { topDoc = window.top.document; } catch (e) {} walk(topDoc || document, 0); if (!out.includes(document)) walk(document, 0); return out; } const BTN_SEL = "a, button, span, div, input[type=button], input[type=submit]"; const POPUP_RE = /pop|dialog|layer|modal|confirm|mask|tip|alert/i; const inPopup = (el) => { for (let e = el; e; e = e.parentElement) if (POPUP_RE.test(String(e.className || "") + " " + (e.id || ""))) return true; return false; }; /** 确认框里的确定/提交按钮(排除页面上原来那个提交按钮) */ function findConfirm(exclude) { for (const re of [/^(确定|确认|确认提交|OK|Confirm)$/i, /^(提交|Submit)$/i]) { const hits = []; for (const d of allDocs()) { for (const el of d.querySelectorAll(BTN_SEL)) { if (el === exclude || (exclude && (exclude.contains(el) || el.contains(exclude)))) continue; if (el.children.length > 1 || !re.test(textOf(el)) || !shownEl(el)) continue; hits.push(el); } } if (hits.length) return hits.find(inPopup) || hits[hits.length - 1]; } return null; } /** 页面上还挂着「Submit? / 确认提交」这类确认框 */ const confirmOpen = () => allDocs().some((d) => [...d.querySelectorAll("div, p, span")].some((el) => el.children.length === 0 && /^(Submit\?|确认提交[??]?|确定提交[??]?|是否提交[??]?)/i.test(textOf(el)) && shownEl(el))); async function submitWork(doc) { const clickable = [...doc.querySelectorAll(BTN_SEL)].filter((el) => shownEl(el) && /^(提交|Submit)$/i.test(textOf(el)) && el.children.length <= 1); // 英文界面是 Submit if (!clickable.length) return false; const btn = clickable[clickable.length - 1]; btn.click(); // 确认框弹出来要一点时间;点了确认后再看框还在不在,最多试 4 次 for (let i = 0; i < 4; i++) { const ok = await waitFor(() => findConfirm(btn), 6000, 500); if (!ok) break; ok.click(); await sleep(1500); if (!confirmOpen()) return true; } return !confirmOpen(); } async function doWork(box, att) { const name = (att.property && (att.property.title || att.property.name)) || "章节测验"; tip("章节测验:等答题完成"); ui.now({ label: "章节测验", big: "答题中", sub: name, pct: 0 }); const done = await waitFor(() => { const r = findIn(frameDoc(box.querySelector("iframe")), "html[data-xc-done]", 3); return r && r.el; }, 15 * 60000, 2000); if (!done) { log("章节测验 15 分钟没答完,跳过:" + name, "warn"); return; } const bad = Number(done.dataset.xcBad || 0); // 开着「全自动」就当作要自动交卷;没开全自动时看设置里的「章节测验自动交卷」 if (!cfg().autoSubmit && !cfg().autoChapter) { log("章节测验已答完,没开全自动,请检查后自己提交:" + name, "warn"); return "stop"; } // AI 答案不保证全对:第一次自动交卷前必须让客户在弹窗里明确同意 if (cfg().submitConsent === undefined) { tip("等你确认:是否用 AI 答案自动交卷", "warn"); GM_setValue("xc_needConsent", Date.now()); ui.send("consent"); await waitFor(() => cfg().submitConsent !== undefined, 30 * 60000, 1000); } if (cfg().submitConsent !== true) { log("章节测验已答完,你选择了不自动交卷,请检查后自己提交:" + name, "warn"); return "stop"; } if (bad > 0) { log("章节测验有 " + bad + " 题没拿到可靠答案,不自动交卷:" + name, "warn"); return "stop"; } // 答完别秒交:随机等 2 到 4 秒再点提交,像人在检查一遍 const wait = 2000 + Math.round(Math.random() * 2000); tip("章节测验答完了," + (wait / 1000).toFixed(1) + " 秒后提交"); await sleep(wait); const ok = await submitWork(done.ownerDocument); log(ok ? "章节测验已提交:" + name : "自动提交没成功(确认框没点上),请自己点提交:" + name, ok ? "ok" : "warn"); await waitFor(() => finishedBox(box), 15000); return ok ? undefined : "stop"; } function studyDoc() { // 课程学习主页面(含目录和下一节按钮),一般是 cards 的上一两层 for (let w = window; ; w = w.parent) { try { if (w.document.querySelector("#prevNextFocusNext, #right1, #coursetree, .posCatalog_select, .prev_next")) return w.document; } catch (e) { return null; } if (w === w.parent) return null; } } const shown = (el) => el && el.getClientRects().length > 0 && getComputedStyle(el).visibility !== "hidden"; /** * 右侧目录里当前小节之后的下一个小节。学习通有两套目录: * 旧/中文版 .posCatalog_select(当前 .posCatalog_active,小节名 .posCatalog_name); * mooc-ans 英文版 #coursetree .ncells(当前小节的 h4 带 .currents,点 span[onclick*=getTeacherAjax])。 */ function catalogItems(doc) { const a = [...doc.querySelectorAll(".posCatalog_select")].filter((e) => e.querySelector(".posCatalog_name")); if (a.length) return a.map((it) => { const name = it.querySelector(".posCatalog_name"); const click = name.getAttribute("onclick") || name.closest("a[onclick], a[href]") || it.getAttribute("onclick") || it.id ? name : null; return { it, click, cur: it.classList.contains("posCatalog_active"), title: (name.getAttribute("title") || name.innerText || "").trim() }; }); return [...doc.querySelectorAll("#coursetree .ncells")].map((it) => { const click = it.querySelector('[onclick*="getTeacherAjax"]'); const h = it.querySelector("h4, h5, .currents") || it; return { it, click, cur: Boolean(it.querySelector(".currents")), title: (h.innerText || "").replace(/\s+/g, " ").trim().slice(0, 40) }; }); } function nextInCatalog(doc) { const items = catalogItems(doc); const cur = items.findIndex((x) => x.cur); if (cur < 0) return null; const n = items.slice(cur + 1).find((x) => x.click); // 章标题行不能点,跳过 return n ? { el: n.click, it: n.it, title: n.title } : null; } async function goNext() { const doc = studyDoc(); if (!doc) { log("本节完成,没找到课程目录和下一节按钮,请手动切换", "warn"); tip("本节完成,找不到下一节,请手动切换", "warn"); return; } // 本节里的多个页签:旧版 #prev_tab li(.active),英文版 .tabtags span#dct1、dct2…(.currents) const tabs = [...doc.querySelectorAll("#prev_tab > li, .prev_ul > li, #prevTabBox > li, .tabtags span[id^='dct']")]; const cur = tabs.findIndex((t) => t.classList.contains("active") || t.classList.contains("currents")); if (cur >= 0 && cur < tabs.length - 1) { log("切到本节下一页:" + (tabs[cur + 1].innerText || "").trim()); tabs[cur + 1].click(); return; } // 「全自动」关着就停在这里,用户打开后接着走 if (!cfg().autoChapter) { ui.state("done"); log("本节已完成。打开「答题」页的「全自动」会自动进入下一节"); while (!cfg().autoChapter) { tip("本节已完成,打开下方「全自动」自动进入下一节"); await sleep(1500); } } const btn = [...doc.querySelectorAll("#prevNextFocusNext, #right1, .orientationright, #mainid .prev_next.next, .nextChapter")].find((e) => shown(e) && !/gray|disable/.test(e.className)); const cat = nextInCatalog(doc); if (!btn && !cat) { if (catalogItems(doc).length) { ui.state("done"); tip("已经是最后一节,看课完成"); log("整门课已经看到最后一节"); } else { log("本节完成,没找到下一节按钮和课程目录,请手动切换(可复制记录发给客服)", "warn"); tip("找不到下一节,请手动切换", "warn"); } return; } log("本节完成,切到下一节" + (cat && cat.title ? ":" + cat.title : "")); await sleep(2000); if (btn) { btn.click(); // 有的课点「下一节」会先弹确认框(框里也有 .nextChapter 按钮) await sleep(1500); const confirm = [...doc.querySelectorAll(".nextChapter")].find(shown); if (confirm) confirm.click(); // 按钮点了但几秒后小节没变,改点目录 await sleep(3500); if (cat && cat.el.isConnected) { const nowCur = catalogItems(doc).find((x) => x.cur); if (!nowCur || nowCur.it !== cat.it) cat.el.click(); } } else cat.el.click(); } async function run() { X.site = "学习通自动看课"; ui.ready(X.site); await waitFor(() => document.readyState === "complete", 30000, 500); const margs = await waitFor(() => { const m = readMArg(); return m && Array.isArray(m.attachments) ? m : null; }, 20000); const boxes = [...document.querySelectorAll(".wrap .ans-cc .ans-attach-ct")]; if (!margs) { if (!boxes.length) { log("本页没有任务点"); await goNext(); } return; } const atts = margs.attachments; log("本页 " + atts.length + " 个任务点"); for (let i = 0; i < atts.length; i++) { await holdWhilePaused(); const att = atts[i], box = boxes[i]; const p = att.property || {}; const type = String(att.type || p.module || ""); if (!att.job || att.isPassed === true || finishedBox(box)) continue; let r; if (/video|audio/i.test(type)) await doMedia(box, att, "任务点 " + (i + 1) + " / " + atts.length); else if (/document|insertdoc|ppt|pdf/i.test(type)) await doDocument(box, att, margs); else if (/work/i.test(type)) r = await doWork(box, att); else log("暂不支持的任务点类型(" + type + "),请手动完成:" + (p.name || p.title || ""), "warn"); if (/work/i.test(type)) ui.now(null); if (r === "stop") { ui.state("done"); tip("章节测验答完了,检查并提交后刷新页面,会接着看下一节", "warn"); return; } } ui.now(null); tip("本页任务点处理完"); await goNext(); } return { run }; })(); /* ---------- 交卷后收集批改结果(1.7.0) ---------- * 学习通章节测验交卷后显示批改页(/work/selectWorkQuestionYiPiYue),每题有「我的答案」和对错标记,有的课还显示正确答案。 * 这里读出单选、多选、判断题的题目、选项、我的答案、对错,发给小柴答题服务存进题库: * 答对 → 存成「交卷核对」答案;判断题答错 → 反过来就是正确答案;选择题答错 → 记为已知错误答案,以后 AI 避开。 * 新旧两种版式都认:新版 .newAnswerBx .myAnswer .answerCon + .CorrectOrNot span.marking_dui/cuo/bandui; * 旧版 .Py_answer 里 span「My Answer:C」+ i.fr.dui/cuo。不需要登录,不扣积分。 */ const Harvest = (() => { const match = () => /(chaoxing|xuexitong)\.com$/.test(location.hostname) && /\/work\/selectWorkQuestionYiPiYue$/.test(location.pathname); const typeOf = (label) => (/单选|Single/i.test(label) ? 0 : /多选|Multiple/i.test(label) ? 1 : /判断|True or False|Judg|对错/i.test(label) ? 3 : /填空|Fill/i.test(label) ? 2 : null); function markOf($box) { const cls = []; $box.find("*").each(function () { cls.push(...String(this.className || "").split(/\s+/)); }); if (cls.some((c) => /bandui/.test(c))) return "bandui"; if (cls.some((c) => c === "cuo" || c === "marking_cuo")) return "cuo"; if (cls.some((c) => c === "dui" || c === "marking_dui")) return "dui"; return ""; } // 「My Answer:ABC」「我的答案:对」→ ["A","B","C"] / ["对"] function answerList(text, type) { const s = String(text || "").replace(/\s+/g, " ").trim(); if (!s) return []; if (type === 3) return [s.split(/[\s;;::]/)[0]]; const letters = s.match(/^[A-L](\s*[,,、]?\s*[A-L])*/); return letters ? letters[0].replace(/[^A-L]/g, "").split("") : []; } function readItem(el) { const $item = $(el); const $q = $item.find(".Zy_TItle .clearfix").first(); const raw = $q.text(); const label = ($item.find(".newZy_TItle").text() || (raw.match(/【(.+?)】/) || [])[1] || ""); const type = typeOf(label); if (type === null || type === 2) return null; const question = cleanQuestion(fmt(imgText($q))); const options = type === 3 ? [] : $item.find("ul:eq(0) > li").map(function () { return fmt(imgText(this)).replace(/^[A-La-l]\s*[.、.]\s*/, "").trim(); }).get(); const $box = $item.find(".newAnswerBx, .Py_answer").first(); if (!$box.length) return null; let my = ""; const $con = $box.find(".myAnswer .answerCon").first(); if ($con.length) my = $con.text(); else $box.find("span").each(function () { const m = $(this).text().match(/(My Answer|我的答案)\s*[::]\s*(.*)/); if (m && !my) my = m[2]; }); const boxText = $box.text().replace(/\s+/g, " "); const rm = boxText.match(/(正确答案|Correct Answer)\s*[::]\s*(.+?)(?=\s*(我的答案|My Answer|得分|Score|$))/i); const item = { type, question, options, my: answerList(my, type), mark: markOf($box), right: rm ? answerList(rm[2], type) : [] }; if (!item.my.length && !item.right.length) return null; return item; } async function run() { for (let i = 0; i < 40 && !document.querySelector(".TiMu"); i++) await sleep(500); if (!document.querySelector(".TiMu")) return; try { prepare(); } catch (e) {} // 还原加密字体,题目文字才和答题时一样 await sleep(300); const items = []; document.querySelectorAll(".TiMu").forEach((el) => { try { const it = readItem(el); if (it) items.push(it); } catch (e) {} }); if (!items.length) return; const doneKey = "xc_harvested_" + md5(items.map((x) => x.question + x.mark).join("|")); if (sessionStorage.getItem(doneKey)) return; try { const r = await svc("/harvest", { site: location.hostname, items }); sessionStorage.setItem(doneKey, "1"); GM_setValue("xc_harvest_total", (Number(GM_getValue("xc_harvest_total")) || 0) + (r.verified || 0) + (r.wrong || 0)); console.log("[小柴答题] 批改结果已存入题库", r); } catch (e) { console.warn("[小柴答题] 批改结果上传失败", e.message); } } return { match, run, readItem }; })(); /* ---------- 平台适配规则 ---------- */ site({ name: "学习通作业", match: location.pathname === "/mooc2/work/dowork" || location.pathname === "/mooc-ans/mooc2/work/dowork", root: ".questionLi", elements: { question: "h3", options: ".stem_answer .answerBg .answer_p, .textDIV, .eidtDiv", $options: ".stem_answer .answerBg, .textDIV, .eidtDiv", type: "input[type^=hidden]:eq(0)" }, wrap: obj => { obj.question = obj.question.replace(obj.$item.find(".colorShallow").text(), "").replace(/^(\d+\.\s)/, ""); }, ignore_click: $item => Boolean($item.find(".check_answer,.check_answer_dx").length), fill: (type, answer, $option) => { if (type === 4 || type === 2 || type === 5) { W.UE.getEditor($option.find("textarea").attr("name")).setContent(answer); } } }); site({ name: "超星旧版考试", match: (location.pathname === "/exam/test/reVersionTestStartNew" || location.pathname === "/exam-ans/exam/test/reVersionTestStartNew") && !location.href.includes("newMooc=true"), root: ".TiMu", elements: { question: ".Cy_TItle .clearfix", options: ".Cy_ulTop .clearfix", $options: ":radio, :checkbox, .Cy_ulTk textarea", type: "[name^=type]:not([id])" }, ignore_click: $item => $item.get(0).checked, fill: (type, answer, $option) => { if (type === 4 || type === 2 || type === 5) { W.UE.getEditor($option.attr("name")).setContent(answer); } }, finished: auto_jump => { auto_jump && setInterval(function() { const btn = $(".saveYl:contains(下一题)").offset(); var mouse = document.createEvent("MouseEvents"), arr = [ btn.left + Math.ceil(Math.random() * 80), btn.top + Math.ceil(Math.random() * 26) ]; mouse.initMouseEvent("click", true, true, document.defaultView, 0, 0, 0, arr[0], arr[1], false, false, false, false, 0, null); W._self.event = $.extend(true, {}, mouse); delete W._self.event.isTrusted; W._self.getTheNextQuestion(1); }, Math.ceil(cfg().fillDelay * Math.random()) * 2); } }); site({ name: "超星章节测验", match: location.pathname === "/work/doHomeWorkNew" || location.pathname === "/mooc-ans/work/doHomeWorkNew", init: prepare, root: ".clearfix .TiMu", elements: { question: ".Zy_TItle .clearfix", options: "ul:eq(0) li .after", $options: "ul:eq(0) li :radio,:checkbox,textarea,.num_option_dx,.num_option", type: "input[name^=answertype]" }, ignore_click: $item => { if ($item.is("input")) { return $item.get(0).checked; } return $item.attr("class").includes("check_answer"); }, fill: async (type, answer, $option) => { if (type === 4 || type === 2 || type === 5) { W.UE.getEditor($option.attr("name")).setContent(answer); } } }); site({ name: "超星新版考试", match: () => { const cxSinglePage = (location.pathname === "/exam/test/reVersionTestStartNew" || location.pathname === "/exam-ans/exam/test/reVersionTestStartNew" || location.pathname === "/mooc-ans/exam/test/reVersionTestStartNew") && location.href.includes("newMooc=true"); const cxAll = location.pathname === "/mooc2/exam/preview" || location.pathname === "/exam-ans/mooc2/exam/preview" || location.pathname === "/mooc-ans/mooc2/exam/preview"; return cxSinglePage || cxAll; }, root: ".questionLi", elements: { question: "h3 div", options: ".answerBg .answer_p, .textDIV, .eidtDiv", $options: ".answerBg, .textDIV, .eidtDiv", type: "input[name^=type]:eq(" + X.i + ")" }, ignore_click: $item => Boolean($item.find(".check_answer,.check_answer_dx").length), hook: () => { X.i = Number((location.pathname === "/exam/test/reVersionTestStartNew" || location.pathname === "/exam-ans/exam/test/reVersionTestStartNew" || location.pathname === "/mooc-ans/exam/test/reVersionTestStartNew") && location.href.includes("newMooc=true")); }, wrap: obj => { if (obj.type === 6) { obj.type = 4; } }, fill: (type, answer, $option) => { if (type === 4 || type === 2 || type === 5) { const name = $option.find("textarea").attr("name"); W.UE.getEditor(name).setContent(answer); if (X.i === 0) { $("#" + name.replace("answerEditor", "save_")).click(); } } }, finished: a => { a && $('.nextDiv .jb_btn:contains("下一题")').click(); } }); site({ name: "超星随堂测验", match: location.pathname.includes("/page/quiz/stu/answerQuestion"), root: ".question-item", elements: { question: ".topic-txt", options: ".topic-option-list", $options: ".topic-option-list input", type: "input[class^=que-type]" }, ignore_click: $item => Boolean($item.find(".check_answer,.check_answer_dx").length), wrap: obj => { if (obj.type === 16) { obj.type = 3; } }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.val(answer); } } }); function hookZhiHuiShuWork(o, arr) { function format(item) { let options = []; let options_id; if (item.questionOptions && item.questionOptions.length) { options = item.questionOptions.map(o => fmt(o.content)); options_id = item.questionOptions.map(o => o.id); } return { qid: item.id, question: fmt(item.name), type: qtype(item.questionType.name), options_id: options_id, options: options }; } if (o.rt && o.rt.examBase && o.rt.examBase.workExamParts.length > 0) { X.content = o.rt; X.json = o.rt.examBase.workExamParts.map(part => part.questionDtos.map(item => { if ("阅读理解(选择)/完型填空" === item.questionType.name || "听力训练" === item.questionType.name || !(item.questionType.name.includes("填空") || item.questionType.name.includes("问答")) && item.questionChildrens && item.questionChildrens.length > 0) { return item.questionChildrens.map(i => { return format(i); }).flat(); } else { return format(item); } })).flat(); } else if (o.rt && Object.keys(o.rt).length > 0 && !isNaN(Object.keys(o.rt)[0])) { X.img = o.rt; } } site({ name: "智慧树作业/考试", match: !location.href.includes("checkHomework") && location.host.includes("zhihuishu") && (location.pathname === "/stuExamWeb.html" || location.href.includes("/webExamList/dohomework/") || location.href.includes("/webExamList/doexamination/")), root: ".examPaper_subject", elements: { question: ".subject_describe div,.smallStem_describe p", options: ".subject_node .nodeLab .node_detail", $options: ".subject_node .nodeLab .node_detail", type: ".subject_type span:first-child" }, hook: () => { hookJSON(hookZhiHuiShuWork); }, intv: () => $(".answerCard").length, wrap: obj => { Object.assign(obj, X.json[X.index - 1]); if ($(".yidun_popup").hasClass("yidun_popup--light")) { ui.tip("答题暂停,请自行通过验证", "warn"); GM_setValue("xc_paused", true); } }, ignore_click: $item => $item.hasClass("onChecked"), fill: (type, answer, $option) => { if (type === 4 || type === 2) { W.UE.getEditor($option.find("textarea").attr("name")).setContent(answer); } }, finished: async () => { ui.tip("正在逐题保存,请勿关闭页面"); const len = $(".answerCard_list li").length; for (let i = 0; i < len; i++) { await sleep(500); try { $(".answerCard_list1 li").eq(i).click(); await sleep(1e3); $(".el-button:contains(下一题)").click(); } catch (e) { $(".el-button:contains(保存)").click(); } const process = ((i + 1) / len * 100).toFixed(0); ui.tip("正在保存 " + process + "%"); } ui.tip("已全部保存,请检查后自己提交"); }, fillFinish: () => { $(".answerCard_list li").eq(X.index - 1).click(); $(".el-button:contains(下一题)").click(); } }); site({ name: "智慧树学分课作业", match: location.href.includes("/atHomeworkExam/stu/homeworkQ/exerciseList") || location.href.includes("atHomeworkExam/stu/examQ/examexercise"), root: ".questionBox:eq(0)", elements: { question: ".questionContent", options: ".optionUl label .el-radio__label,.el-checkbox__label", $options: ".optionUl label", type: ".questionTit" }, intv: () => $(".answerCard").length || $(".questionTit").length, wrap: async obj => { obj.options = obj.options.map(item => fmt(item.replaceAll(/^[a-zA-Z][.|\s+]/g, ""))); if ($(".yidun_popup").hasClass("yidun_popup--light")) { ui.tip("答题暂停,请自行通过验证", "warn"); GM_setValue("xc_paused", true); } }, ignore_click: $item => $item.hasClass("is-checked"), finished: () => { if ($(".Nextbtndiv .Topicswitchingbtn-gray:contains(下一题)").hasClass("Topicswitchingbtn-gray")) return false; $(".Topicswitchingbtn:contains(下一题)").click(); return true; } }); site({ name: "智慧树学分课考试", match: location.host === "studentexambaseh5.zhihuishu.com", root: ".ques-detail", elements: { question: ".questionName .centent-pre", options: ".radio-view li .preStyle,.checkbox-views label .preStyle", $options: ".radio-view li,.checkbox-views label", type: ".letterSortNum" }, intv: () => $(".questionContent").length, ignore_click: $item => $item.hasClass("is-checked"), wrap: obj => { obj.options = obj.options.map(item => fmt(item.replaceAll(/^[a-zA-Z][.|\s+]/g, ""))); if ($(".yidun_popup").hasClass("yidun_popup--light")) { ui.tip("答题暂停,请自行通过验证", "warn"); GM_setValue("xc_paused", true); } if (obj.type === 15) { obj.question = fmt($(".centent-son-pre").text()); obj.type = 1; } }, finished: auto_jump => { if (auto_jump) { const btn = $(".next-topic:contains(下一题)"); btn.click(); return !btn.hasClass("noNext"); } } }); site({ name: "职教云考试", match: location.pathname === "/exam/examflow_index.action", intv: () => $(".divQuestionTitle").length, root: ".q_content", elements: { question: ".divQuestionTitle", options: ".questionOptions .q_option", $options: ".questionOptions .q_option div,div[id^=_baidu_editor_]" }, ignore_click: $item => $($item).attr("class") === "checkbox_on", wrap: obj => { const type = qtype(obj.$item.next().attr("answertype")); obj.type = type === undefined ? guessType(obj.$options) : type; }, fill: (type, answer, $option) => { if (type === 4 || type === 2 || type === 5) { W.UE.getEditor($option.attr("id")).setContent(answer); } }, finished: async () => { if ($(".paging_next").attr("style").includes("block") || !$(".paging_next").attr("style").includes("none")) { $(".paging_next").click(); await sleep(1e3); return true; } } }); site({ name: "职教云测验", match: location.pathname === "/study/directory/dir_course.html", intv: () => $(".panel_item").length, root: ".panel_item .panel_item", elements: { question: ".preview_cm .preview_stem", options: ".preview_cm ul li span:last-child", $options: ".preview_cm ul li input" }, wrap: obj => { obj.type = qtype(obj.$item.parent().find(".panel_title").text()); obj.options = obj.options.map(i => i.trim().replace(/^[abAB]\)\s+/, "").replace(/^[A-Za-z]\s+/, "").trim()); }, ignore_click: $item => $item.attr("checked") === "checked" }); site({ name: "职教云MOOC", match: location.pathname === "/study/homework/do.html" || location.pathname === "/study/workExam/testWork/preview.html" || location.pathname === "/study/onlineExam/preview.html" || location.pathname === "/study/workExam/homeWork/preview.html" || location.pathname === "/study/workExam/onlineExam/preview.html", root: ".e-q-r", elements: { question: ".e-q-q .ErichText", options: ".e-a-g li", $options: ".e-a-g li", type: ".quiz-type" }, ignore_click: $item => $item.hasClass("checked"), wrap: obj => { if (obj.type === "A1A2题") { obj.type = 1; } obj.question = obj.question.replace(//gi, ""); obj.options = obj.options.map(i => i.trim().replace(/^[abAB]\)\s+/, "").replace(/^[A-Za-z]\s+/, "").trim()); } }); site({ name: "职教云MOOCAI", match: location.pathname.includes("/preview-exam") && location.host === "ai.icve.com.cn", intv: () => $(".questions").length, root: ".paper-content .questions", elements: { question: ".single-title-content,.multiple-title-content,.judge-title", options: ".single-item-xxnr,.multiple-item-xxnr,.judge-item-xxnr", $options: "label", type: ".single-title-num,.multiple-title-num,.judge-title-num" }, wrap: obj => { obj.options = obj.options.map(i => i.trim().replace(/^[abAB]\)/, "").replace(/^[A-Za-z]/, "").trim()); }, finished: () => { if ($(".ivu-btn:contains(下一题)").hasClass("btn_dis")) return false; $(".ivu-btn:contains(下一题)").click(); return true; } }); function parseIcve(questions) { return questions.map(item => { const options = item.Selects.map(opt => fmt(opt)); const type = qtype(item.ACHType.QuestionTypeName); const answer = item.Answers.map(key => { if (type === 0 || type === 1) { return options[key.charCodeAt() - 65]; } else if (type === 3) { return key === "1" ? "正确" : "错误"; } }); const answerKey = type === 0 || type === 1 ? item.Answers : answer; return { id: item.Id, question: item.ContentText, answerKey: answerKey, options: type === 3 ? [ "正确", "错误" ] : options, answer: answer, type: type }; }); } site({ name: "资源库 新版", match: location.pathname === "/icve-study/jobTest" || location.pathname === "/icve-study/coursePreview/jobTest" || location.pathname === "/icve-study/coursePreview/test", root: ".subjectDet", elements: { question: "h5,.titleTest span:last", options: ".optionList label", $options: ".optionList input", type: ".title,.titleTest .xvhao" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { W.UE.getEditor($option.attr("name")).setContent(answer); } } }); site({ name: "资源库 WWW开头", match: location.pathname === "/study/works/works.html" || location.pathname === "/study/exam/exam.html", root: ".questions", elements: { question: ".preview_stem", options: "li .preview_cont", $options: "li input", type: "input:hidden" }, hook: () => { hookJSON(o => { if (location.pathname === "/study/works/works.html") { if (o.paper) { X.json = parseIcve(o.paper.PaperQuestions); } } else if (location.pathname === "/study/exam/exam.html") { if (o.array) { X.json = parseIcve(o.array.map(item => item.Questions).flat()); } } }); }, ignore_click: $item => $item.prop("checked"), wrap: obj => { function get_element(id) { for (let jsonElement of X.json) { if (jsonElement.id === id) { return jsonElement; } } } const ele = get_element(obj.$item.find("input:hidden").val()); obj.question = ele.question; obj.answer = ele.answerKey ? ele.answerKey : ele.answer; obj.type = ele.type; obj.options = ele.options; }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { W.UE.getEditor($option.attr("name")).setContent(answer); } } }); site({ name: "智慧职教 作业/考试", match: location.host.includes("zjy2.icve.com.cn"), intv: () => $(".subjectDet").length, root: ".subjectDet", elements: { question: "h5,.titleT .htmlP", options: ".optionList .el-radio__label,.el-checkbox__label", $options: ".optionList input", type: ".titleTwo,.xvhao" }, hook: () => { const parse = ques => ques.map(i => { const options = []; const answer = []; if (i.typeId === "3") { answer.push(i.optionAnswer === "1" ? "正确" : "错误"); } else if (/[12]/.test(i.typeId)) { options.push(...JSON.parse(i.dataJson).map(i => { if (i.IsAnswer) { answer.push(fmt(i.Content)); } return fmt(i.Content); })); } return { options: options, qid: i.id, answer: answer }; }); hookJSON(o => { if (o.name && o.questions && o.totalScore) { X.json = parse(o.questions); } else if (o.data && o.data.questions) { X.json = parse(o.data.questions); } }); }, ignore_click: $item => $($item).parent().attr("class") === "is-checked", wrap: obj => { function findAnswer(id) { for (let jsonElement of X.json) { if (jsonElement.qid === id) { return jsonElement.answer; } } } obj.answer = findAnswer(obj.$item.attr("id")); } }); function parsehnzkwText(problems) { return problems.map(item => { const type = item.flag === 1 ? 2 : item.flag === 0 ? 0 : item.flag === 4 ? 1 : item.flag === 3 ? 3 : undefined; let answer = []; let options = []; if (type === 2) { answer.push(item.answer); return { question: fmt(item.content), options: options, type: type, answer: answer }; } else if (type === 0) { for (let subjectOption of item.optionss) { const opt = fmt(subjectOption); options.push(opt); } if (type === 1) { item.answer.split("|").map(i => { answer.push(options[i.toUpperCase().charCodeAt(0) - 65]); }); } else { answer.push(options[item.answer.toUpperCase().charCodeAt(0) - 65]); } return { question: fmt(item.content), options: options, type: type, answer: answer }; } else if (type === 3) { for (let subjectOption of item.selectOption) { const opt = fmt(subjectOption); options.push(opt); } answer.push(item.answer); return { question: fmt(item.content), options: options, type: type, answer: answer }; } }); } function parseDanWei(pro) { return pro.map(i => { const type = qtype(i.ttop010); const question = i.ttop011; const options = []; const answer = []; if (type === 0 || type === 1 || type === 3) { options.push(...i.ttop018.length > 0 ? i.ttop018.split("$$") : [ "正确", "错误" ]); answer.push(...i.ttop022.split("").map(item => options[item.charCodeAt(0) - 65])); } else if (type === 2 || type === 4) { answer.push(...i.ttop021.split("$$")); } return { question: question, type: type, answer: answer, options: options }; }).filter(i => i); } function parseYxbyunExam(problems) { return problems.map(item => { const type = qtype(item.dtmc); return item.sjSjstSaveReqVOS.map(item => { let answer = []; let options = []; if (type === 2) { return { question: fmt(item.tg), options: options, type: type, answer: answer }; } else if (type === 0 || type === 3 || type === 1) { let answer = item?.dxpdtda ? item?.dxpdtda.split(",") : item?.dxtda ? item?.dxtda.split(",") : []; let options = []; for (let subjectOption of item?.tkStxxSaveReqVOS || []) { const opt = fmt(subjectOption.xxnr); options.push(opt); } return { question: fmt(item.tg), options: options, type: type, answer: answer }; } }); }); } function parseYxbyunTest(problems) { return problems.map(item => { const type = qtype(item.bigName); return item.smallContent.map(item => { let answer = []; let options = []; if (type === 2) { answer.push(item.answer); return { question: fmt(item.content), options: options, type: type, answer: answer }; } else if (type === 0 || type === 3 || type === 1) { let answer = []; let options = []; for (let subjectOption of item.question.optionList) { const opt = fmt(subjectOption.questionContent); options.push(opt); } if (type === 1) { item.question.questionAnswer.split(",").map(i => { answer.push(options[i.toUpperCase().charCodeAt(0) - 65]); }); } else { answer.push(options[item.question.questionAnswer.toUpperCase().charCodeAt(0) - 65]); } return { question: fmt(item.question.questionTitle), options: options, type: type, answer: answer }; } }); }); } function parseShihuaExam(problems) { return problems.partitions.map(item => item.questions.map(item => { const type = qtype(item.queTypeName); let answer = []; let options = []; if (type === 2) { answer.push(item.answer); return { question: fmt(item.stem), options: options, type: type, answer: answer }; } else if (type === 0 || type === 3 || type === 1) { let answer = []; let options = []; if (type === 3) { options = [ "对", "错" ]; } else { item.options.map(i => { const opt = fmt(i.optInfo); options.push(opt); }); } if (type === 1) { item.answer.split(",").map(i => { answer.push(options[i - 0]); }); } else if (type === 3) { if (item.answer === "Y") { answer = [ "对" ]; } else { answer = [ "错" ]; } } else { answer.push(options[item.answer - 0]); } return { question: fmt(item.stem), options: options, type: type, answer: answer }; } })); } site({ name: "考试系统", match: location.host === "gdrtvu.exam-cloud.cn" && location.pathname.includes("examRecordData"), intv: () => $("#examing-home-question").length, root: ".question-container", elements: { question: ".question-body:first", options: ".option .question-options", $options: ".option input", type: ".question-header .container" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { const split = obj.question.split(/[A-G]\./); if (split.length === obj.options.length + 1) { obj.question = split.shift(); obj.options = split; } if (obj.type === undefined || obj.type === null || isNaN(obj.type) || obj.type > 3) { obj.type = guessType(obj.$options); } if (document.querySelector(".question-container .right")) { let current = 0; const domItem = document.querySelectorAll(".item"); for (const dom of domItem) { current++; if (dom.className.includes("current-question")) { break; } } obj.question = `【第${current}小题】` + imgText(jQuery(".right .question-view .question-body")) + obj.question; } }, finished: async need_jump => { await sleep(500); if ($(".next a").length === 0) { return false; } window.parent.document.querySelector(".next a").click(); return true; } }); site({ name: "云班课", match: location.pathname === "/web/index.php" && location.href.includes("m=reply"), root: ".topic-item", elements: { question: ".t-con .t-subject", options: ".t-option label .option-content", $options: ".el-radio__input,.el-checkbox__input", type: ".t-info .t-type" }, ignore_click: $item => $item.hasClass("is-checked"), wrap: obj => { if (obj.type === "A1A2题") { obj.type = 1; } obj.question = obj.question.replace(//gi, ""); obj.options = obj.options.map(i => i.trim().replace(/^[abAB]\)\s+/, "").replace(/^[A-Za-z]\s+/, "").trim()); } }); site({ name: "中国地质大学", match: location.pathname.includes("/Exam/OnlineExamV2/"), root: ".stViewItem", elements: { question: ".stViewHead div", options: ".stViewCont .stViewOption a", $options: ".stViewCont .stViewOption a,input" }, intv: () => $(".ExamTime").length, wrap: obj => { obj.type = qtype(obj.$item.parent().parent().prev().find(".E_E_L_I_C_R_C_T_SubType").text()); obj.question = obj.question.replace(/\(\d+分\)/, ""); obj.options = obj.options.map(i => i.replace(/\([A-Za-z]\)/, "").trim()); }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.val(answer); } } }); site({ name: "单位", match: (location.host === "61.183.163.9:8089" || location.host === "zjpt.nnjjtgs.com:8081") && (location.href.includes("ksnr") || location.href.includes("lxnr")), hook: () => { hookJSON(o => { if (o.topicList && o.topicList.length > 0) { X.json = parseDanWei(o.topicList); } }); }, root: ".tm", elements: { question: ".tmnrbj span:last-child", options: ".van-radio-group .dxt .van-radio__label,.van-checkbox__label", $options: ".van-radio-group .dxt .van-radio__label,.van-checkbox__label,.van-field__control", type: ".tmnrbj span" }, intv: () => $(".ExamTime").length || document.getElementById("pup-b"), wrap: obj => { obj.answer = X.json[jQuery(".tmnrbj span:last-child").text().match(/^(\d+)、/)[1] - 1].answer; }, finished: () => { jQuery(".xyt").click(); return true; } }); site({ name: "小鹅通", match: location.pathname.includes("/evaluation_wechat/examination/detail/"), root: ".question-title,.title__text", elements: { question: "#detail_div", options: "label .image-text-box p", $options: "label,.simulation_inp" }, ignore_click: ($item, type) => { if (type === 0) { return $item.html().includes("single-exam-radio-active"); } else if (type === 1) { return $item.html().includes("check-i-active"); } }, wrap: obj => { const $item = obj.$item; obj.$options = $item.parent().next().find(".option-item,.checking-option__container,.fill_blank"); obj.type = qtype($item.next().text()); if (obj.type === 2) { obj.$options = $item.parent().parent(); } if (obj.type === 3) { obj.options = [ "正确", "错误" ]; } else { obj.options = jQuery.map($item.parent().next().find(".option-item #detail_div"), function(val) { return fmt(imgText(val)); }); } }, fill: (type, answer, $option) => { if (type === 2) { const vue = $option.get(0).__vue__; vue.content[0] = answer; vue.emitAnswer(); $option.find(".simulation_inp").text(answer); } } }); site({ name: "小饿通H5", match: location.host.includes("h5.xiaoeknow") || location.href.includes("/exam/h5_evaluation/"), root: ".practice-detail__body", elements: { question: ".question-wrap__title #detail_div", options: ".question-option #detail_div", $options: ".question-option #detail_div", type: ".question-wrap__title-tag" }, wrap: obj => { const $item = obj.$item; obj.$options = $item.parent().next().find(".option-item,.checking-option__container,.fill_blank"); obj.type = TYPE_MAP[$item.next().text().replace(/\s+/, "").replace("(", "").replace(")", "")]; if (obj.type === 2) { obj.$options = $item.parent().parent(); } if (obj.type === 3) { obj.options = [ "正确", "错误" ]; } else { obj.options = jQuery.map($item.parent().next().find(".option-item #detail_div"), function(val) { return fmt(imgText(val)); }); } }, finished: () => { $(".practice-detail__bottom-item:last-child").click(); return $(".next").text() === "下一题"; } }); site({ name: "人卫慕课测验", match: location.pathname.includes("/memberFront/paper.zhtml"), intv: () => $("#question_").attr("style").length === 0, root: ".quesinfo", elements: { question: "dl dt", options: "dd label", $options: "dd input" }, wrap: obj => { if (obj.$options.length === 2) { obj.type = 3; obj.options = [ "正确", "错误" ]; } else { obj.type = 0; } } }); site({ name: "青书学堂考试", match: location.host.includes("qingshuxuetang") && (location.pathname.includes("/Student/MakeupExamPaper") || location.pathname.includes("Student/ExamPaper")), intv: () => $(".paper-container .question-detail-container").length, root: ".paper-container .question-detail-container", elements: { question: ".question-detail-description .detail-description-content", options: ".question-detail-options label .option-description", $options: ".question-detail-options label input", type: ".question-detail-type .question-detail-type-desc" }, wrap: obj => { obj.qid = obj.$item.attr("id"); obj.options = obj.options.map(i => i.replace(/\([A-Za-z]\)/, "").trim()); if (obj.type === 5 || obj.type === 4 || obj.type === 6) { obj.$options = obj.$item.find("div[id^=cke_editor]"); } }, fill: (type, answer, $option) => { if (type === 4 || type === 5 || type === 6) { W.CKEDITOR.instances[$option.attr("id").replace("cke_", "")].setData(answer); } }, ignore_click: $item => $item.prop("checked") }); site({ name: "青书学堂测验", match: location.host.includes("qingshuxuetang") && (location.pathname.includes("/Student/ExercisePaper") || location.pathname.includes("/Student/SimulationExercise")) || location.host === "quiz.qingshuxuetang.com" && location.pathname.includes("/Student/Quiz/Detail"), intv: () => $(".question-detail-container").length, root: ".question-detail-container", elements: { question: ".question-detail-description span", options: ".question-detail-options label .option-description", $options: ".question-detail-options div input,.question-detail-solution-textarea", type: ".question-detail-type" }, wrap: obj => { obj.qid = obj.$item.attr("id"); obj.options = obj.options.map(i => i.replace(/\([A-Za-z]\)/, "").trim()); }, ignore_click: ($item, type) => { if (type === 1) { return $item.prop("checked"); } }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.parents().find(".question-controller-wrapper .next").click(); } } }); site({ name: "优学院测验", match: location.pathname === "/learnCourse/learnCourse.html", intv: () => $(".question-setting-panel").length, root: ".split-screen-wrapper", elements: { question: ".question-title-scroller .question-title-html", options: ".choice-list .content-wrapper .text", $options: ".choice-list .checkbox ,.question-body-wrapper .choice-btn", type: ".question-title-scroller .question-type-tag" }, wrap: obj => { obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); }, ignore_click: $item => $item.hasClass("selected") }); site({ name: "优学院作业", match: location.pathname === "/quiz/pc.html", intv: () => $(".questions").length, root: ".question-item", elements: { question: ".question-title", options: "ul label .choice-title", $options: "ul label input", type: ".title" }, wrap: obj => { obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); }, ignore_click: $item => $item.prop("checked") }); site({ name: "优学院考试", match: location.host === "utest.ulearning.cn" && location.pathname === "/", intv: () => $(".section-area").length, root: ".question-area .question-item", elements: { question: ".base-question .title .rich-text", options: ".choice-list label .rich-text", $options: ".choice-list label, .iconfont", type: ".base-question .title .tip" }, wrap: obj => { obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); }, ignore_click: $item => $item.hasClass("is-checked"), finished: () => { if ($(".next-part:contains(下个部分)").length) { $(".next-part").click(); return true; } else { return false; } } }); site({ name: "优学院作业", match: location.pathname === "/umooc/learner/homework.do", intv: () => $(".multiple-choices").length, root: ".multiple-choices,.judge", elements: { question: "h5 .position-rltv span:last-child", options: "ul label span:last-child", $options: "ul label input,.radios .radio input", type: "h5 .typeName" }, wrap: obj => { obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); }, ignore_click: $item => $item.prev().hasClass("checkbox-checked") }); site({ name: "万学", match: location.pathname.includes("/sls/N2014_StudyController/next"), root: ".question", elements: { question: "tr .nm2", options: ".grey td p", $options: ".option li label", type: "tr .nm2" }, wrap: obj => { obj.question = obj.question.parent().find("td p").text(); } }); site({ name: "wenJuanAutoFill", match: location.host.includes("wenjuan.com") && location.pathname === "/s/", root: "questionContent", elements: { question: ".title", options: ".icheckbox_div .option_label", $options: ".icheckbox_div label", type: ".question_num" }, ignore_click: $item => $item.attr("class").includes("checked") }); site({ name: "学起(考试)", match: location.pathname.includes("/oxer/page/ots/examIndex.html"), intv: () => $(".tika_topline").length, root: ".queItemClass", elements: { question: "dt .din:eq(1)", options: ".clearfix div", $options: ".clearfix .xuan,input" }, ignore_click: $item => $item.parent().hasClass("cur"), wrap: obj => { obj.plat = 66; obj.qid = obj.$item.attr("id"); obj.type = qtype(obj.$item.parent().find("div .fb:eq(0)").text()); if (obj.type === 3) { obj.options = [ "正确", "错误" ]; } } }); site({ name: "学起(测试)", match: location.pathname.includes("/oxer/page/ots/UniversityStart.html"), intv: () => $(".uniQueList").length, root: ".uniQueItem", elements: { question: ".QueStem", options: "ul li span", $options: "ul li" }, ignore_click: $item => $item.parent().hasClass("lichecked"), wrap: obj => { obj.type = qtype(obj.$item.parents(".uniQueList").find(".fir").text()); if (obj.type === 3) { obj.options = [ "正确", "错误" ]; } } }); site({ name: "易班考试", match: location.host === "exam.yooc.me" && location.pathname.includes("/group"), intv: () => $(".jsx-3527395752").length, root: "main:last", elements: { question: "h3 div", options: ".mb ul li .flex-auto", $options: ".mb ul li", type: ".mb-s" }, ignore_click: $item => $item.hasClass("_c"), fill: (type, answer, $option) => { if (type === 4 || type === 2) { $(".exam-input").val("answer"); } }, finished: need_jump => { if ($('.round:contains("下一题")').hasClass("ghost")) return false; $('.round:contains("下一题")').click(); return true; } }); site({ name: "英华学堂", match: () => { const pathMatch = location.pathname.includes("/user/work") || location.pathname.includes("/user/exam"); const matchHostArr = [ "mooc.kdcnu.com", "mooc.yncjxy.com", "mooc.cdcas.com", "mooc.cqcst.edu.cn", "mooc.kmcc.edu.cn", "mooc.wuhues.com" ]; return pathMatch && matchHostArr.includes(location.host); }, intv: () => $("#stateName").text().trim() === "进行中", root: ".courseexamcon-main", elements: { question: ".name", options: ".list li .txt", $options: ".list li .exam-inp", type: ".type" }, ignore_click: $item => $item.prop("checked"), fill: (type, answer, $option) => {}, finished: auto_jump => { if ($(".next_exam").eq(3).prop("style")[0] == "display") return false; $(".next_exam").click(); } }); site({ name: "厦门在线教育测验", match: location.pathname.includes("/nec/student/exam/exam-paper!test"), root: "#paper_form > div:nth-child(4) > table:nth-child(1) > tbody:nth-child(2)>tr:even", elements: { question: "td:eq(1)", options: ".optionUl label .el-radio__label,.el-checkbox__label", $options: ".optionUl label" }, wrap: obj => { obj.options = obj.$item.next().find("tbody:first > tr tbody").map((i, y) => $(y).find("td:eq(1)").text()).toArray(); obj.$options = obj.$item.next().find("tbody:first > tr tbody").map((i, y) => $(y).find("input")); obj.type = 0; } }); site({ name: "金牌学堂", match: location.host === "www.goldgame.com.cn" && location.href.includes("/TestPage"), intv: () => $(".tab-btn-box li").length, root: ".test-type-box ul .white-bg", elements: { question: ".position-relative h3", options: ".test-option label p:last-child", $options: ".test-option label input" }, wrap: obj => { obj.question = obj.question.replace(/题目\d+\:/, "").trim().replace(/^\d+./, ""); obj.type = qtype(obj.$item.parent().parent().find(".test-type-tips").text()); if (obj.$options.length > 2 && obj.$options.eq(0).hasClass("radiobox")) { obj.type = 0; } }, fillFinish: data => { $(".answer-sheet li").eq(X.index).click(); } }); site({ name: "青岛开放大学", match: location.pathname.includes("/pages/exam/exam.html"), intv: () => $(".exam-content-block .exam-content-topic").length, root: ".exam-content-block .exam-content-topic", elements: { question: ".exam-topic-title", options: ".exam-topic-answer .layui-unselect span", $options: ".exam-topic-answer .layui-unselect" }, wrap: obj => { obj.type = qtype(obj.$item.parent().find(".exam-content-title .exam-content-num").text()); } }); site({ name: "点墨考试", match: location.pathname.includes("/Exam/StartExam"), root: "#question div div:first", elements: { question: "div:first", options: "div:first ~ div", $options: "div:first ~ div input" }, wrap: obj => { obj.type = qtype($(".alert #groupNameSpan").text()); }, finished: () => { $(".w-100 .btn-light:eq(1)").click(); return true; } }); site({ name: "点墨测验", match: location.pathname.includes("/Course/TestPaper"), root: ".question", elements: { question: " div div:first div:first", options: " div div:first div:first ~ div", $options: " div div:first div:first ~ div input" }, wrap: obj => { obj.type = qtype($("h3").text()); obj.question = obj.question.replace(/^\d+\./, ""); } }); site({ name: "警官学院", match: location.pathname.includes("/bsmytest/startTi.do"), root: ".wrapper > div", elements: { question: ".dx", options: "p", $options: "p input" }, wrap: obj => { if ($(".wrapper .cl").length > 0) { obj.question = obj.$item.text().replace(/[0-9]、/, "").replace(/(.*?)/g, "").trim().split("$")[0].replace(/\(.*?\)/g, "").trim(); } else { obj.question = obj.question.replace(/[0-9]、/, "").replace(/(.*?)/g, "").trim(); } obj.type = qtype(obj.$item.parent().find("h2").text()); obj.options = obj.options.map(item => item.replace(/[A-Za-z][:]/, "").replace(/[A-Za-z][:,\:]/, "").replace(/;/, "").trim()); } }); site({ name: "exam2_euibe_com_exam", match: location.hostname === "exam2.euibe.com" && location.pathname === "/KaoShi/ShiTiYe.aspx", root: ".question", elements: { question: ".wenti", options: "li label span", $options: "li label" }, wrap: obj => { obj.type = qtype($(".question_head").text()); }, finished: need_jump => { $(".paginationjs-next").click(); return true; } }); site({ name: "lzwyedu_jijiaool_com_exam", match: () => { const pathMatch = location.pathname.includes("/learnspace/course/test/") || location.pathname.includes("/Student/ExamManage/CourseOnlineExamination"); const matchHostArr = [ "lzwyedu.jijiaool.com", "cgjx.jsnu.edu.cn", "learn-cs.icve.com.cn", "nwnu.jijiaool.com", "lut.jijiaool.com", "learn.courshare.cn", "cj1027-kfkc.webtrn.cn" ]; return pathMatch && matchHostArr.includes(location.host); }, root: ".test_item", elements: { question: ".test_item_tit", options: ".test_item_theme label .zdh_op_con", $options: "label input" }, wrap: obj => { obj.question = obj.question.replace(/该题未做$/, "").replace(/^\d+\./, "").replace(/^\d+、/, "").replace(/[((](\d+\s?(\.\d+)?分)[))]$/, "").replace(/^((\d+.(\s+)?)?)[\[((【](.*?)[】))\]]/, "").trim(); obj.type = qtype(obj.$item.prevAll(".test_item_type:first").text()); if (obj.type === 3) { obj.options = [ "对", "错" ]; } } }); site({ name: "zzx_ouchn_edu_cn_exam", match: location.hostname === "zzx.ouchn.edu.cn" && location.pathname.includes("/edu/public/student/"), root: ".subject", elements: { question: ".question span", options: ".answer>span>p:first-child", $options: ".answer>span>p:first-child" }, wrap: obj => { if (obj.$options.length > 1) { obj.type = 0; } } }); site({ name: "zzx_ouchn_edu_cn_exam", match: location.hostname === "zzx.ouchn.edu.cn" && location.pathname.includes("/edu/public/student/"), root: ".subject", elements: { question: ".question span", options: ".answer>span>p:first-child", $options: ".answer>span>p:first-child" }, wrap: obj => { if (obj.$options.length > 1) { obj.type = 0; } } }); site({ name: "havust_hnscen_cn_exam", match: location.hostname === "havust.hnscen.cn" && location.pathname.includes("/stuExam/examing/"), root: ".main .mt_2 > div", elements: { question: ".flex_row+div", options: ".flex_row+div+div .el-radio__label,.el-checkbox__label", $options: ".flex_row+div+div .el-radio__label,.el-checkbox__label", type: ".flex_row .mr_2" } }); site({ name: "www_zygbxxpt_com_exam", match: location.hostname === "www.zygbxxpt.com" && location.pathname.includes("/exam"), root: ".Body", elements: { question: ".QName", options: ".QuestinXuanXiang p:parent", $options: ".QuestinXuanXiang p:parent", type: ".QName span" }, wrap: obj => { obj.question = obj.question.replace(/\([^\)]*\)/g, "").replace(/【.*?】/g, ""); obj.options = obj.options.map(item => item.split(">").pop().trim()); } }); site({ name: "xuexi_jsou_cn_work", match: location.hostname === "xuexi.jsou.cn" && location.pathname.includes("/jxpt-web/student/newHomework/showHomeworkByStatus"), root: ".insert", elements: { question: ".window-title", options: ".questionId-option .option-title div[style^=display]", $options: ".questionId-option .option-title .numberCover" }, wrap: obj => { obj.type = { 1: 0, 2: 1, 7: 3 }[obj.$item.find(".question-type").val()]; if (obj.options.length == 2) { obj.type = 3; } } }); site({ name: "czvtc_cjEdu_com_exam", match: () => { const pathMatch = location.pathname.includes("/ExamInfo") || location.pathname.includes("/Examination"); const matchHostArr = location.host.includes("cj-edu.com"); return pathMatch && matchHostArr; }, intv: () => $(".el-container .all_subject>.el-row").length, root: ".el-container .all_subject>.el-row", elements: { question: ".stem div:last-child", options: ".el-radio-group .el-radio__label,.el-checkbox-group .el-checkbox__label", $options: ".el-radio-group .el-radio__original,.el-checkbox-group .el-checkbox__original" }, wrap: obj => { if (obj.$options.length < 3 && obj.$options.eq(0).attr("type") === "radio") { obj.type = 3; } else if (obj.$options.length > 2 && obj.$options.eq(0).attr("type") === "radio") { obj.type = 0; } else if (obj.$options.length > 2 && obj.$options.eq(0).attr("type") === "checkbox") { obj.type = 1; } } }); site({ name: "learning_mhtall_com_exam", match: location.host.includes("learning.mhtall.com") && location.pathname.includes("/rest/course/exercise/item"), root: "#div_item", elements: { question: ".item_title", options: ".opt div label", $options: ".opt div input:not(.button_short)", type: "h4" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { if (obj.type === 0 || obj.type === 3) { obj.answer = $(".div_answer").text().match(/[a-zA-Z]/).map(i => obj.options[i.charCodeAt(0) - 65]); } else if (obj.type === 2) { obj.answer = $(".div_answer").text().replace("参考答案:", "").split(","); } }, fill: (type, answer, $option) => { if (type === 2 || type === 4) { $option.val(answer); $(".DIV_TYPE_BLANK .button_short").click(); } }, fillFinish: () => { if ($(".opt+div+div input:eq(1)").val() === "下一题") { $(".opt+div+div input:eq(1)").click(); } else { $(".button_short:eq(2)").click(); } } }); site({ name: "168网校(测验)", match: location.host.includes("168wangxiao.com") && location.pathname.includes("/web/learningCenter/details/"), intv: () => $(".ret-answer").length === 0 && $(".info-container").length, root: ".question-item-container", elements: { question: ".title-content", options: ".options .opt-content", $options: ".options label", type: ".top .type" } }); site({ name: "168网校(考试)", match: location.host.includes("168wangxiao.com") && location.pathname.includes("/web/examination/answer"), intv: () => $(".Answer-area").length, root: ".Answer-area", elements: { question: ".listTit", options: ".el-radio__label span:last-child,.el-checkbox__label span:last-child", $options: ".el-radio__input,.el-checkbox__input input,.ql-editor p" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { if (obj.options.length === 0) { obj.type = 2; } }, fill: (type, answer, $option) => { if (type === 2 || type === 4) { document.querySelector(".ql-editor p").textContent = answer; } }, finished: () => { if ($(".ctrl .el-button:contains(下一题)").length != 0) { $(".ctrl .el-button:contains(下一题)").click(); return true; } else if ($(".ctrl .el-button:contains(上一题)").length && $(".ctrl button").length === 1) { return false; } } }); site({ name: "法宣在线", match: location.host.includes("faxuanyun.com") && location.pathname.includes("/bps/examination"), intv: () => $("#timucontent").length, root: "#timucontent", elements: { question: "h2", options: "ul li", $options: "ul input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.question.replace(/[((].+?[))]/g, ""); if ($(".layui-layer-content").length) { ui.tip("答题暂停,请自行通过验证", "warn"); $("#lastButton").click(); GM_setValue("xc_paused", true); return false; } }, finished: need_jump => { if ($("#nextButton").length) { $("#nextButton").click(); return true; } else { return false; } } }); site({ name: "山财培训网 (补考)", match: location.host.includes("training.sdufe.edu.cn") && location.pathname.includes("/Exam/OnlineExam/"), intv: () => $(".exam_r_m").length, root: ".exam_r_m", elements: { question: ".bt", options: ".btm", $options: ".btm input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.question.replace(/[((].+?[))]/g, ""); obj.options = $("br").parent().text().split(/[A-Z]\./).slice(1).map(item => item.trim()); if (obj.type === 3) { obj.answer = $("#answerDiv").text().replace("正确答案:", "").split(); } else { obj.answer = $("#answerDiv").text().match(/[A-Z]/g).map(item => obj.options[item.charCodeAt(0) - 65]); } }, finished: () => { document.querySelector("#next").click(); if (document.querySelector("#noAskCount").textContent == "0") { return false; } return true; } }); site({ name: "和学在线", match: location.host.includes("studentjxjyzx") || location.host.includes("student.hexuezx") || location.host.includes("student.jxjyzx"), intv: () => $(".el-card__body").length, root: ".el-card__body", elements: { question: ".stem", options: ".el-radio__label,.el-checkbox__label span", $options: ".el-radio__input,.el-checkbox__input input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.question.replace(/[((].+?[))]/g, ""); } }); site({ name: "高教在线", match: location.host === "www.cqooc.com" && (location.href.includes("/learn/mooc/exam/do") || location.href.includes("/learn/mooc/testing/do")), intv: () => $("#test-form").length, root: "#test-form .cat", elements: { question: ".stem", options: ".option label", $options: ".option input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.question.replace(/\(\d+分\)\d+\.\d+/, ""); } }); site({ name: "考试平台", match: location.pathname.includes("/kaoshi_qnzzxy/kaoshi.html"), intv: () => $(".form-group").length, root: ".form-group", elements: { question: ".row-fluid", options: ".option", $options: ".option input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.type = qtype(obj.$item.parent().find("div:first").text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]:\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); } }); site({ name: "柠檬文才(考试)", match: () => { const pathMatch = location.pathname.includes("/separation/exam/"); const matchHostArr = [ "learning.wuxuejiaoyu.cn", "learning.wencaischool.net", "learning.zk211.com", "study.wencaischool.net", "www.wencaischool.net" ]; return pathMatch && matchHostArr.includes(location.host); }, intv: () => $("#paperExam").css("display") != "none", root: ".paperWrapper .tmList", elements: { question: ".tmTitleTxt", options: ".ansbox .opCont", $options: ".ansbox input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { if (obj.options.length === 0) { obj.type = 2; } }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.val(answer); } } }); site({ name: "柠檬文才独立考试", match: () => { const pathMatch = location.hash.includes("/exam?studentId"); const matchHostArr = [ "exam.wencaischool.net" ]; return pathMatch && matchHostArr.includes(location.host); }, intv: () => $("#paperExam").css("display") != "none" && $(".timenum").length, root: ".paperWrapper .tmList .tmc", elements: { question: ".tmTitleTxt", options: ".ansbox .opCont", $options: ".ansbox input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { if (obj.options.length === 0) { obj.type = 2; } }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.val(answer); } } }); site({ name: "柠檬文才(作业)", match: () => { const matchHostArr = [ "learning.wuxuejiaoyu.cn", "learning.wencaischool.net", "learning.zk211.com", "study.wencaischool.net" ]; return (location.pathname.includes("/hblearning/exam/") || location.pathname.includes("/xbsflearning/exam/") || location.pathname.includes("/openlearning/exam/") || location.pathname.includes("/jxlearning/exam/") || location.pathname.includes("/shandonglearning/exam")) && matchHostArr.includes(location.host); }, intv: () => $("#paperExam").css("display") !== "none", root: "#_block_content_exam #tblDataList>tbody>tr", elements: { question: "tbody:first>tr>td:last table", options: ".ansbox .opCont", $options: ".ansbox input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = $("#_block_content_exam #tblDataList>tbody>tr>td").find(" tbody:first>tr>td:last table:first").eq(X.index - 1).find("tr:first").text(); obj.options = []; $("#_block_content_exam #tblDataList>tbody>tr>td").find(" tbody:first>tr>td:last table:first").eq(X.index - 1).find("tr:first").next().find("label").map((i, y) => { obj.options.push($(y).text()); }); obj.$options = $("#_block_content_exam #tblDataList>tbody>tr>td").find(" tbody:first>tr>td:last table:first").eq(X.index - 1).find("tr:first").next().find("input").map((i, y) => y); obj.type = 0; if (obj.options.length == 2) { obj.type = 3; } else if (obj.$options.eq(0).attr("type") != "radio") { obj.type = 1; } } }); site({ name: "福建师范", match: location.host === "neo.fjnu.cn" && location.pathname.includes("/resource/index"), intv: () => $(".content").length && !$(".answer-content").length, root: ".content", elements: { question: ".title", options: "label .el-radio__label,.el-checkbox__label", $options: "label input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { } }); site({ name: "优课学堂", match: location.host.includes("youkexuetang.cn") && location.pathname.includes("/student/"), intv: () => $(".paperItemBox").length, root: ".paperItemBox", elements: { question: ".stem", options: ".el-radio__label,.el-checkbox__label", $options: ".el-radio__input,.el-checkbox__input input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.question.replace(/[((].+?[))]/g, ""); } }); site({ name: "亿学宝云考试", match: location.host.includes("yxbyun.com") && location.href.includes("/exam"), intv: () => $(".datiqu").length, hook: () => { hookJSON(o => { if (o?.data?.sjSjRespDto?.sjDtSaveReqVOS) { X.json = parseYxbyunExam(o?.data?.sjSjRespDto?.sjDtSaveReqVOS).reduce((acc, cur) => acc.concat(cur), []); } }); }, root: ".danxuan", elements: { question: ".tm", options: ".xuanxiang .xxnr", $options: ".xuanxiang .xxbh", type: ".tx" }, wrap: obj => { Object.assign(obj, X.json[X.index - 1]); }, ignore_click: $item => $item.prop("checked") }); site({ name: "亿学宝云", match: location.host.includes("yxbyun.com") && location.hash.includes("/testPaper"), intv: () => $(".time_header").length || $(".pager_wrap").length, hook: () => { hookJSON(o => { if (o.data && o.data.bigContent) { X.json = parseYxbyunTest(o.data.bigContent).reduce((acc, cur) => acc.concat(cur), []); } }); }, root: ".test", elements: { question: ".type", options: ".el-radio-group,.el-checkbox-group label", $options: ".el-radio__input,.el-checkbox__input input", type: ".el-tag" }, wrap: obj => { Object.assign(obj, X.json[X.index - 1]); }, ignore_click: $item => $item.prop("checked") }); site({ name: "考试星(单题)", match: Boolean(location.host === "exam.kaoshixing.com" && location.pathname.includes("/exam/exam_start")), intv: () => $("#nextQuestions").length, root: ".questions .questions-content", elements: { question: ".question-name", options: ".answers label .words", $options: ".answers label" }, ignore_click: $item => $item.parent().find("input").prop("checked"), wrap: obj => { obj.question = obj.question.replace(/[((].+?[))]/g, ""); }, finished: () => { if ($("#nextQuestions:contains(下一题)").length && $("#nextQuestions").css("display") !== "none") { $("#nextQuestions:contains(下一题)").click(); return true; } else { return false; } } }); site({ name: "易考云", match: location.host === "exam.beeouc.com" && location.pathname.includes("/client"), intv: () => $(".question-body").length, root: ".question-body", elements: { question: ".question-stem", options: ".question-option label", $options: ".question-option input", type: ".question-type" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { }, finished: () => { if ($(".question-footer button:contains(下一题)").length) { $(".question-footer button:contains(下一题)").click(); return true; } else { return false; } } }); site({ name: "伊犁师范成人教育", match: location.pathname.includes("/learn/NewExam") || location.pathname.includes("//GeneralTestPaper/Testing/") || location.pathname.includes("//GeneralTestPaper/SNTesting"), intv: () => $(".topic").length, root: ".topic", elements: { question: ".qsctt", options: ".xuan li", $options: ".choice input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.options = obj.options.map(i => i.replace(/^[A-Z] \. /, "")); if (obj.$options.length == 2) { obj.options = [ "正确", "错误" ]; obj.type = 3; } } }); site({ name: "绎通云课堂 (作业)", match: location.host.includes("ytccr.com") && (location.hash.includes("#/learning-work") || location.hash.includes("#/learning-details")), intv: () => $(".left-question").length, root: ".border-item", elements: { question: ".qa-title", options: "label .opt-title-cnt", $options: "label input" }, ignore_click: $item => $item.prop("checked") }); site({ name: "重庆大学网络教育学院 (作业)", match: location.host === "exercise.5any.com" && location.pathname.includes("/Exercise/WebUI/Test/Answer"), intv: () => $(".examtime-content").length, root: ".subject .font-16", elements: { question: ".stem .richtextcontent", options: ".option .richtextcontent", $options: ".option label input" }, ignore_click: $item => $item.prop("checked") }); site({ name: "毕节幼儿师范", match: location.host === "px.gzbjyzjxjy.cn" || location.host === "px.ggcjxjy.cn" && location.pathname.includes("/exam/shiti/dopapers"), intv: () => $(".panel-body").length, root: ".panel-body>div", elements: { question: ".testpaper-question-stem", options: ".testpaper-question-choices li", $options: ".testpaper-question-footer input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { } }); site({ name: "贵州继续教育", match: location.host === "www.gzjxjy.gzsrs.cn" && location.pathname.includes("/personback/"), intv: () => $(".question-title").length, root: ".question-title", elements: { question: ".show-text", options: "label", $options: "label input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { } }); site({ name: "和学自考", match: location.host === "zkpt.qdu.edu.cn" && location.pathname.includes("/examStu/exam/examPaper"), intv: () => $(".ant-spin-container").length, root: ".ant-row", elements: { options: "label", $options: "label input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.$item.parent().parent().prev().text(); } }); site({ name: "专技天下", match: location.host.includes("zgzjzj.com") && location.pathname.includes("/examination/perpar.html"), intv: () => $(".question_index").length, root: ".question_index", elements: { question: "p", options: ".options li p,li>span:last-child", $options: ".options li", type: "p span" }, ignore_click: $item => $item.hasClass("active") }); site({ name: "睿学补考", match: location.href.includes("exam-app-exam-paper") && location.host.includes("ks.hustsnde.com"), intv: () => $("#paper").length, root: "#paper .content-box", elements: { question: "ul li:eq(0) .desc", options: "ul li:eq(1)", $options: "ul label input", type: ".title" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { const options = obj.options[0].trim().split(/\[[A-Z]:?\]/).splice(1).map(i => i.trim()).filter(i => i); if (options.length === 0) { obj.options = obj.options[0].trim().split(/\(?[A-Z\.?]\)?/).splice(1).map(i => i.trim()).filter(i => i); } else { obj.options = options; } if (obj.type === 3) { obj.options = [ "正确", "错误" ]; } } }); site({ name: "云上河开", match: location.host === "jx.open.ha.cn" && location.pathname.includes("/jxpt-web/student/homework/showHomeworkByStatus"), intv: () => $("#shiti-content").length, root: ".insert", elements: { question: ".window-title", options: "ul li div:last-child", $options: "ul li .numberCover" }, ignore_click: $item => $item.parent().hasClass("answer-title"), wrap: obj => { obj.type = qtype(obj.$item.parents(".layui-colla-item").find(".titleType").text()); } }); site({ name: "ycjy.lut.edu.cn", match: location.host === "ycjy.lut.edu.cn" && location.pathname.includes("/learnspace/course/test/coursewareTest_intoTestPage.action"), intv: () => $(".bank_cont").length, root: ".test_item", elements: { options: "label", $options: "label input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.type = qtype(obj.$item.parent().find(".test_item_type").text()); obj.question = obj.$item.find(".test_item_tit").contents()[0].nodeValue.trim(); } }); site({ name: "exam.euibe.com", match: location.host === "exam.euibe.com" && location.pathname.includes("/KaoShi/ShiTiYe.aspx"), intv: () => $(".question_list").length, root: ".question", elements: { question: ".wenti .stem", options: "label span", $options: "label input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.type = qtype(obj.$item.parents(".question_list").find(".question_head").text()); }, finished: need_jump => { if ($(".paginationjs-next").hasClass("disabled")) { return false; } $(".paginationjs-next").click(); return true; } }); site({ name: "学晖教育", match: location.host === "xhjy.ldzxjy.com" && location.pathname.includes("tikuUserBatch/keepTopic"), intv: () => $(".radio").length, root: ".radio", elements: { question: ".issueTitle", options: "ul li span", $options: "ul li", type: ".issueTypes" }, ignore_click: $item => $item.prop("checked"), finished: need_jump => { if ($(".next").text().includes("交卷")) { return false; } $(".next").click(); return true; } }); site({ name: "东财在线", match: location.host === "classroom.edufe.com.cn" && (location.pathname.includes("/PracticePaper") || location.pathname.includes("/HomeWorkPaper")), intv: () => $(".TK-main").length, root: ".CBTPaperMain-trunk", elements: { question: ".CBTPaperMain-divInline", options: "ul li label", $options: "ul li label" }, ignore_click: $item => $item.hasClass("_CheckBox_checked") }); site({ name: "北华大学在线教育", match: () => { const pathnameArr = [ "cj1026-kfkc.webtrn.cn", "beihua.peishenjy.com" ]; return pathnameArr.includes(location.pathname) && location.pathname.includes("/Learning/CourseOnlineExamination") || location.pathname.includes("/learnspace/course/test"); }, intv: () => $(".s_mi").length, root: ".test_item", elements: { question: ".test_item_tit", options: " label", $options: "label input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { } }); site({ name: "上海立达学院", match: location.host === "kkzxsx.lidapoly.edu.cn" && location.pathname.includes("/exam/"), intv: () => $(".exam-question").length, root: ".main .item", elements: { question: ".text", options: ".options label .el-radio__label,.el-checkbox__label", $options: ".options label" }, ignore_click: $item => $item.hasClass("is-checked"), wrap: obj => { obj.type = qtype(obj.$item.parent().find(".text").text()); } }); site({ name: "石家庄科技继续教育", match: location.host.includes("kc.jxjypt.cn") && location.pathname.includes("/paper/start"), intv: () => $(".sub-content").length, root: ".sub-content", elements: { question: ".sub-dotitle", options: ".sub-answer dd", $options: ".sub-answer dd,.mater-respond textarea", type: ".sub-dotitle i" }, ignore_click: $item => $item.hasClass("cho-this"), wrap: obj => { }, fill: (type, answer, $option) => { if (type === 4) { $option.val(answer); } } }); site({ name: "石家庄理工职业学院", match: location.host.includes("edu.tianzerencai.com") && location.pathname.includes("/examinationDetail"), intv: () => $(".topic").length, root: ".topic", elements: { question: ".title", options: ".main", $options: ".main", type: ".title" }, ignore_click: $item => $item.hasClass("cho-this"), wrap: obj => { if (obj.type === 3) { obj.options = [ "正确", "错误" ]; obj.$options = obj.$item.find(".judge button"); } else if (obj.type === 1) { obj.options = obj.$item.find(".checkbox .option_text").map((i, y) => $(y).text()).toArray(); obj.$options = obj.$item.find(".checkbox button"); } else if (obj.type === 0) { obj.options = obj.$item.find(".radio .option_text").map((i, y) => $(y).text()).toArray(); obj.$options = obj.$item.find(".radio button"); } } }); site({ name: "国开军盾", match: location.host.includes("s.jundunxueyuan.com") && location.hash.includes("#/exam/"), intv: () => $(".the-paper .section-item-question-item").length, root: ".section-item-question-item", elements: { plat: 43, question: ".question-tit", options: ".el-radio-group label,.el-checkbox-group label", $options: ".el-radio-group input,.el-checkbox-group input", type: ".sub-dotitle i" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.type = qtype(obj.$item.parents(".section-item").find(".section-item-tit").text()); } }); site({ name: "博学bx", match: location.host.includes("bx.bossyun.com") && location.pathname.includes("/bx/study/examine"), intv: () => $(".question-list").length, root: ".question-list", elements: { question: ".title", options: ".ant-radio-group label,.ant-checkbox-group label", $options: ".ant-radio-group input,.ant-checkbox-group input", type: ".tag" }, ignore_click: $item => $item.prop("checked") }); site({ name: "博学bx", match: location.host.includes("bx.bossyun.com") && location.pathname.includes("/bx/study/examine"), intv: () => $(".question-list").length, root: ".question-list", elements: { question: ".title", options: ".ant-radio-group label,.ant-checkbox-group label", $options: ".ant-radio-group input,.ant-checkbox-group input", type: ".tag" }, ignore_click: $item => $item.prop("checked") }); site({ name: "电中在线", match: location.host.includes("old-zzx.ouchn.edu.cn") && location.pathname.includes("/edu/public/student/"), intv: () => $(".subject").length, root: ".subject", elements: { question: ".question", options: ".answer .option-name", $options: ".answer" }, wrap: obj => { obj.type = 0; } }); site({ name: "爱学", match: () => { const pathMatch = location.pathname.includes("/Web/Test/doing"); const matchHostArr = [ "ai.ztbu.edu.cn", "www.51ixuejiao.com" ]; return pathMatch && matchHostArr.includes(location.host); }, intv: () => $("card-title").length, root: ".exam dd", elements: { question: "card-title", options: ".ans_area div", $options: ".ans_area div", type: "info" }, ignore_click: $item => $item.attr("selected") === "selected", wrap: obj => { }, fillFinish: data => { if (data.ans.includes("span") || data.type === 1) { $(".move_btn span:last").click(); } } }); site({ name: "人卫智网", match: location.host.includes("exam.ipmph.com") && location.pathname.includes("/front/myschool/index.html"), intv: () => $(".body").length, root: ".body", elements: { question: ".fch2 font", options: ".selet .el-radio__label", $options: ".selet input" }, wrap: obj => { obj.type = 0; }, finished: () => { if (document.querySelector(".el-message-box__btns")) return false; document.querySelector("#next_btn").click(); return true; } }); site({ name: "卫生人力资源系统", match: location.host.includes("vgos.zbwsrc.cn") && location.pathname.includes("/TESExamClient/"), intv: () => $(".testitem").length, root: ".testitem", elements: { question: ".stem", options: ".inputitem li", $options: ".inputitem input" }, wrap: obj => { obj.type = 0; } }); site({ name: "继教在线(考试)", match: location.pathname.includes("/Student/ExamManage/CourseOnlineExamination"), intv: () => $(".test_item").length, root: ".test_item", elements: { question: ".test_item_tit", options: ".test_item_theme label", $options: ".test_item_theme input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { const $item = obj.$item; obj.type = qtype($item.prevAll(".test_item_type").text()); if (obj.type === 3) { obj.options = [ "正确", "错误" ]; } } }); site({ name: "培训系统(考试)", match: location.pathname.includes("ShowItemView"), intv: () => $(".choice-interaction").length, root: ".choice-interaction", elements: { question: ".select-clickstyle span", options: ".text-simple-choice .text", $options: ".text-simple-choice input", type: ".item-content" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { const $item = obj.$item; obj.type = qtype($item.parent().prevAll(".item-content").text()); }, finished: () => { window.parent.document.querySelector(".nextBtn").click(); } }); site({ name: "传媒(考试)", match: location.pathname.includes("/Exam/onlineTest/ShiTiYe.aspx"), intv: () => $("#Content").length, root: ".ShiTi", elements: { question: ".Paper_ParentQuestionDesc", options: ".Paper_Answer li", $options: ".Paper_Answer input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { const $item = obj.$item; obj.type = qtype($item.parents("#ContentText").find("#ExamFrameQuesDesc").text()); }, finished: () => { window.parent.document.querySelector("#btnNext").click(); } }); site({ name: "慧考试", match: location.pathname.includes("/examSystemPCInner/"), intv: () => $(".question-list-box").length, root: ".question-list-box > div", elements: { question: ".topic-title", options: ".option_list", $options: ".option_list ", type: ".question-type-name" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { } }); site({ name: "河北开放", match: location.pathname.includes("/exam/") && location.host === "lms.cjzx.hblll.com", intv: () => $(".loading-gif").hasClass("ng-hide") && $(".hd .examinee .submit-label").eq(0).text() === "", root: ".card ol .single_selection,.multiple_selection,.true_or_false,.short_answer", elements: { question: ".summary-title .subject-description", options: ".subject-options li .option-content", $options: ".subject-options label .left", type: ".summary-sub-title span:eq(0)" }, ignore_click: ($item, type) => type === 1 && $item.find("input").hasClass("ng-not-empty") }); site({ name: "自考365", match: location.host === "member.zikao365.com" && location.pathname.includes("generaltest/exam.shtm"), intv: () => $(".timu").length, root: ".timu", elements: { question: ".timu-tit", options: ".timu-list .list", $options: ".timu-list input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { } }); site({ name: "幕享", match: location.host === "web.moycp.com" && location.pathname.includes("/study"), intv: () => $(".question-list").length, root: ".question-list", elements: { question: ".question-title", options: ".answer-option label", $options: ".answer-option input", type: ".singleflag" }, ignore_click: ($item, type) => { if (type === 1) { return $item.prop("checked"); } }, wrap: obj => { }, fillFinish: data => { if (data.style === "warning-row" || data.type === 1) { $(".next-submit .next").click(); } }, finished: () => { if ($(".next-submit .next").hasClass("noClick")) { return false; } return true; } }); site({ name: "麦能", match: location.pathname.includes("/lms/web/onlineexam/exambegin"), intv: () => $(".sdiv").length, root: ".sdiv", elements: { question: ".eptimu_name", options: ".ansdiv div", $options: ".ansdiv input", type: ".eptimu_title" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { }, fillFinish: () => { if ($(".layui-layer").length) { return false; } $(".eptimu_btn_next:eq(0)").click(); return true; } }); site({ name: "天使在线", match: location.pathname.includes("/pages_jsp/mobile/courseSimulate.html") || location.pathname.includes("/pages_jsp/mobile/coursExamView.html") || location.pathname.includes("/pages_jsp/mobile/courseAnswer.html"), intv: () => $("#qusData").length, root: ".neixunExamQuestionHead", elements: { question: "#title", options: ".option", $options: ".option", type: ".tag" }, wrap: obj => { }, fillFinish: () => { if ($(".next").attr("style") && $(".next").attr("style").includes("display")) { return false; } $(".next").click(); return true; } }); site({ name: "江西应用", match: location.pathname.includes("examinationAnswer"), intv: () => $(".answer-subject-details").length, root: ".answer-subject-details", elements: { question: ".answer-subject", options: "ul li p", $options: "ul li", type: ".answer-subject-top" }, wrap: obj => { } }); site({ name: "在线学习平台", match: location.host === "edu.netdig.cn" && location.pathname.includes("/paper.html"), intv: () => $(".test-list").length, root: ".position-relative", elements: { question: ".tmtitle-p", options: "label .span-inline", $options: "label input", type: ".customtktype" }, wrap: obj => { } }); site({ name: "含弘", match: location.host === "zuoye.eduwest.com" && location.pathname.includes("/examinationrecord"), intv: () => $("#float_right").length, root: "tr td table:has(a)", elements: { question: "td:first", options: "a", $options: "input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { }, finished: () => { if ($("#button #next").length != 0) { $("#button #next").click(); return true; } else { return false; } } }); site({ name: "华莘学堂", match: location.host.includes("huashenxt.com") && location.pathname.includes("/mgr.html"), intv: () => $(".terms .question-item").length, root: ".question-item", elements: { question: ".question_title .text", options: ".choice_item .text,.judge_item label", $options: ".choice_item .choice_option,.judge_item input", type: ".question_type" }, ignore_click: $item => $item.hasClass("selected"), wrap: obj => { } }); site({ name: "春风雨", match: location.host.includes(".cfyedu.com"), intv: () => $(".answer").length, root: ".el-col-16 div[id]", elements: { question: ".title", options: ".radio-option", $options: ".radio-option" }, wrap: obj => { obj.type = qtype(obj.$item.parent().find(".content-title").text()); } }); site({ name: "心理健康", match: location.host.includes("zgxlwsxh.oxcoder.com.cn"), intv: () => $(".question-box").length, root: ".question-container", elements: { question: ".question-box .ques-desc-content", options: ".question-box label", $options: ".question-box label input", type: ".directory-title" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.question = obj.question.replace(/\(\d+分\)/, ""); }, finished: need_jump => { if ($(".ant-btn-circle:last").hasClass("disabled")) { return false; } $(".ant-btn-circle:last").click(); return true; } }); site({ name: "西安交通大学", match: location.host.includes("kj.xjtudlc.com"), intv: () => $(".swiper-wrapper").length, root: ".swiper-slide", elements: { question: ".layui-space-item .question", options: ".layui-checkcard-desc", $options: ".layui-checkcard-desc", type: ".layui-space-item:first" }, ignore_click: $item => $item.parents(".layui-checkcard").hasClass("layui-checkcard-checked"), wrap: obj => { obj.question = obj.question.replace(/\(\d+分\)/, ""); } }); site({ name: "文鼎省考练习", match: location.host.includes("www.iwdjy.com") && location.href.includes("guochengxing-tongkao-shuati"), intv: () => $(".is-justify-center").length, root: ".is-justify-center", elements: { question: ".clearfix div div:last", options: ".el-card__body label", $options: ".el-card__body input", type: ".clearfix div div:first" }, ignore_click: $item => $item.parents(".layui-checkcard").hasClass("layui-checkcard-checked"), wrap: obj => { obj.question = obj.question.replace(/\(\d+分\)/, ""); }, fillFinish: () => { if ($(".right_answer").length) { return false; } $(".nextExam").click(); return true; }, finished: need_jump => { if ($('.nextExam:contains("下一题")').length === 0) return false; $('.nextExam:contains("下一题")').click(); return true; } }); site({ name: "国开", match: location.host === "lms.ouchn.cn" && location.pathname.includes("/exam/"), intv: () => $(".loading-gif").hasClass("ng-hide") && $(".hd .examinee .submit-label").eq(0).text() === "", root: ".card ol .single_selection,.multiple_selection,.true_or_false,.short_answer", elements: { question: ".summary-title .subject-description", options: ".subject-options li .option-content", $options: ".subject-options label .left", type: ".summary-sub-title span:eq(0)" }, ignore_click: ($item, type) => type === 1 && $item.find("input").hasClass("ng-not-empty") }); site({ name: "广开", match: () => { const pathMatch = location.pathname.includes("/mod/quiz/attempt.php"); const matchHostArr = [ "moodle.syxy.ouchn.cn", "xczxzdbf.moodle.qwbx.ouchn.cn", "elearning.bjou.edu.cn", "whkpc.hnqtyq.cn:5678", "course.ougd.cn", "study.ouchn.cn" ]; return pathMatch && matchHostArr.includes(location.host); }, root: ".que", elements: { question: ".qtext", options: ".answer div label,.flex-fill", $options: ".answer div input:visible" }, wrap: data => { if (data.type === undefined) { try { data.type = 4; data.$item.find(".qtext .accesshide").remove(); data.question = fmt(data.$item.find(".qtext").html()); data.$options = data.$item.find("input[id$=_answer]"); } catch (e) {} } }, ignore_click: $item => Boolean($item.parent().find("input").eq(-1).prop("checked")), finished: () => { $(".submitbtns .btn-primary").click(); }, fill: (type, answer, $option) => { if (type === 4) { $option.val(answer); } } }); site({ name: "保定继续教育", match: location.pathname.includes("/exam/answer.html"), root: ".stem-container", elements: { question: ".stem span", options: ".option div .optStem", $options: ".option div input" }, intv: () => $("#question").length, wrap: obj => { obj.type = qtype(obj.$item.parent().parent().find(".description").text()); } }); site({ name: "noNiExam.js", match: location.pathname === "/app-afstudy/self_test.html", root: ".lineClass .b-papp-root", elements: { question: ".b-exam-top .b-exam-tit", options: ".b-exam-box li label", $options: ".b-exam-box li input", type: ".b-exam-top .b-exam-type" }, ignore_click($item) { return $item.prop("checked"); }, wrap(obj) { obj.options = obj.options.map(i => i.replace(/[A-Za-z][:]/, "").replace(/[A-Za-z][:,\:]/, "").replace(/;/, "").trim()); } }); site({ name: "www_pbaqks_com_text", match: location.host === "www.pbaqks.com" && location.pathname.includes("/P_ExamDetail/OnlineStuday"), root: ".main-container .single-box", elements: { question: ".single-main:first", options: ".choose-box label", $options: ".choose-box label", type: ".single-container .font-title", answer: "input:eq(1)" }, ignore_click: $i => $i.find("input").is(":checked"), wrap: obj => { obj.question = obj.question.replace("标准答案", "").replace(/^\d+\./, "").replace(/\[.+?\]/g, "").trim(); }, fillFinish: () => { if ($(".main-container .single-box").find("input:eq(1)").eq(X.index - 1).attr("value").split("").length > 1) { jQuery(".main-container .confirm a:last-child").click(); } } }); site({ name: "安徽继续教育", match: location.pathname.includes("/study/html/content/studying/") || (location.pathname === "/study/html/content/tkOnline/" || location.pathname === "/study/html/content/sxsk/" || location.pathname === "/study/html/content/bkExam/"), intv: () => ($(".e-save-b").length || $(".e-b-g").length) && $(".totalscore").length === 0, root: ".e-q", elements: { question: ".e-q-q .ErichText", options: ".e-a-g li", $options: ".e-a-g li" }, ignore_click: $item => $item.attr("class").includes("checked"), wrap: obj => { obj.type = qtype(obj.$item.parent().prev().find(".e-text").text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/^[ab]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); } }); site({ name: "安徽继续教育新版", match: location.pathname.includes("/app/noFrame/jxjy-student-space-web"), intv: () => $(".yu_title").length, root: ".container", elements: { question: ".content-title", options: ".option-item", $options: "li", type: ".topic_type" }, finished: () => { $(".operate_bottom").click(); return $(".operate_bottom").attr("class").includes("enable_tip"); } }); site({ name: "大连/九江", match: location.href.includes("/onlineclass/exam/"), intv: () => $(".excer_list_view___2Ahg9") || $(".excer_list_view___YOSCa"), root: ".single_excer_item___lFMCm,.single_excer_item___2lGB8", elements: { plat: 40, question: ".title_content___1Qagx .title_content_text___27NIL, .title_content___24J6D .title_content_text___8ruL4", options: ".options_content___nXSwG label .option_text___udjiE, .options_content___2YgyG label .option_text___1mfcu", $options: ".options_content___nXSwG label input,.options_content___2YgyG label input", type: ".title_content___1Qagx span:eq(1),.title_content___24J6D span:eq(1)" }, ignore_click: $item => $($item).parent().hasClass("ant-checkbox-checked"), wrap: obj => { }, fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.val(answer); } } }); site({ name: "新疆继续教育", hook: () => { function parseXinJiangAgain(questions) { return questions.map(item => { const answer = []; const options = item.answers.map(opt => { if (opt.isAnswer === "0") answer.push(fmt(opt.name)); return fmt(opt.name); }); const type = item.types === "2" ? 3 : parseInt(item.types); return { question: item.name, options: options, answer: answer, type: type }; }); } hookJSON(o => { if (o.success && o.data.exam) { const arr = o.data.exam.assessList.map(i => i.questionList).flat(); X.json = parseXinJiangAgain(arr); } }); }, match: location.host === "www.ttcdw.cn" && location.pathname.includes("/p/uExam/goExam/"), root: ".question-item", elements: { question: ".question-item-title span", options: ".question-item-option label .el-checkbox__label,.el-radio__label", $options: ".question-item-option label" }, wrap: obj => { Object.assign(obj, X.json[X.index - 1]); }, intv: () => !$("div").hasClass("entrying-wrap"), ignore_click: $item => $item.hasClass("is-checked"), fill: (type, answer, $option) => { if (type === 4 || type === 2) { $option.val(answer); } } }); site({ name: "华侨继续教育", match: location.pathname.includes("/exam/student/exam/resource/paper_card2"), intv: () => $(".ui-question-answer-right").length === 0, root: ".ui-question-group .ui-question", elements: { question: ".ui-question-title div", options: ".ui-question-options div", $options: ".ui-question-options .ui-question-options-order,.ke-container" }, wrap: obj => { obj.type = qtype(obj.$item.parent().find("h2").text()); }, ignore_click: $item => $item.parent().hasClass("ui-option-selected"), fill: (type, answer) => { if (type === 4 || type === 2 || type === 6) { const x = X.index - $(".ui-question-options ").length - 1; W.KindEditor.instances[x].html(answer); } } }); site({ name: "上海开放大学", match: location.pathname.includes("/study/assignment/preview.aspx") || location.pathname.includes("/study/assignment/continuation.aspx"), hook: () => { if (X.finish || $("a:contains(已完成批阅)").length === 1) { ui.tip("本页面已做完,无需自动答题", "warn"); return true; } }, root: ".e-q", elements: { question: ".e-q-q .ErichText", options: ".e-a-g li", $options: ".e-a-g li" }, wrap: obj => { obj.type = qtype(obj.$item.parent().parent().parent().find(".e-text").eq(0).text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); }, ignore_click: $item => $item.attr("class").includes("checked") }); site({ name: "浙江考试", match: location.pathname === "/web-qz/moni/exam/exam_toExam.action", root: ".dt_tmcon", elements: { question: "div:eq(0) span:eq(1)", options: "div:eq(1) p", $options: "div:eq(1) p input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { obj.type = qtype(obj.$item.parents().find(".dt_rtitle1").eq(0).text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); if (obj.type === 0) { obj.answer = [ JSON.parse($("#quesSSForm #userAnssStr_0").val()).rightAnswer ]; } }, finished: () => $(".page li input:eq(2)").attr("disabled") !== "disabled", fillFinish: () => { $(".page li input:eq(2)").click(); } }); site({ name: "在浙学考试", match: location.host === "www.zjooc.cn" && (location.pathname.includes("/homework/") || location.pathname.includes("/test/") || location.pathname.includes("/exam/")), hook: () => { function parseZaiZheXue(problems) { return problems.map(item => { if (!item.rightAnswer) return undefined; const subjectType = item.subjectType; let type = -1; const question = fmt(item.subjectName); const answer = []; const options = []; if (subjectType === 1 || subjectType === 2) { type = subjectType - 1; for (let subjectOption of item.subjectOptions) { const opt = fmt(subjectOption.optionContent); options.push(opt); if (item.rightAnswer.includes(subjectOption.optionHead)) { answer.push(opt); } } } else if (subjectType === 3) { type = 3; answer.push(item.rightAnswer === "yes" ? "正确" : "错误"); } else { return undefined; } return { question: question, options: options, type: type, answer: answer }; }).filter(i => i && i.answer.length > 0); } if (!(location.pathname.includes("/homework/do") || location.pathname.includes("/test/do") || location.pathname.includes("/exam/do"))) { hookJSON(o => { if (o.data && o.data.paperName && o.data.clazzIds && o.data.paperSubjectList) { const data = parseZaiZheXue(o.data.paperSubjectList); } }); return true; } }, root: ".questiono-item", elements: { question: "h6 .processing_img", options: ".questiono-main label .el-radio__label,.el-checkbox__label", $options: ".questiono-main label" }, wrap: obj => { obj.type = qtype(obj.$item.parent().prev().text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); }, ignore_click: $item => $item.hasClass("is-checked") }); site({ name: "在浙学(测验/考试)", match: location.host === "www.zjooc.cn" && location.pathname.includes("/singleQuestion/do/"), intv: () => $(".settingsel-dialog").css("display") === "none", root: ".question_content:first", elements: { question: ".question_title", options: ".question_content .radio_content div", $options: ".question_content label" }, wrap: obj => { obj.type = qtype(obj.$item.parent().find(".question_title p").eq(0).text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").replace(".", "").trim())); }, ignore_click: $item => $item.hasClass("is-checked"), finished: () => { if ($(".question_btn .el-button:contains(下一题)").hasClass("is-disabled")) return false; $(".el-button:contains(下一题)").click(); return true; } }); site({ name: "福建继续教育测验|作业", match: location.pathname === "/Web_Study/Student/Center/MyWorkOnView" || location.pathname === "/Web_Study/Student/Center/MyExamOnView", intv: () => $(".samllTopicNav").length, root: ".topic-cont", elements: { question: "p", options: ".options li span", $options: ".options li" }, wrap: obj => { obj.options = obj.options.map(i => i.replace(/选项[A-Za-z]/, "").trim()); obj.type = { 1: 0, 2: 1, 3: 3, 6: 4 }[obj.$item.attr("itemtype")]; if (obj.type === undefined) obj.type = 4; }, ignore_click: $item => $item.hasClass("correct"), fill: (type, answer, $option) => {} }); site({ name: "湖南继续教育", match: () => { const pathMatch = location.pathname.includes("/User/Student/myhomework.aspx") || location.pathname.includes("/examing.aspx"); const matchHostArr = [ "www.jwstudy.cn", "hdjt.wuxuekeji.com", "csjs.ynlhxy.com" ]; return pathMatch && (matchHostArr.includes(location.host) || location.host.includes("ls365.net") || location.host.includes("ls365.com")); }, root: ".exam_question", elements: { question: ".exam_question_title div", options: ".question_select .select_detail", $options: ".question_select li", type: ".exam_question_title div strong" }, ignore_click: $item => $item.hasClass("cur") }); site({ name: "德阳继续教育", match: location.href.includes("/dypx/OnlineExam/Exam.aspx"), root: "#divProblemArea", elements: { question: "#ulProblems li:first", options: "#ulProblems .answer", $options: "#ulProblems .answer input" }, ignore_click: $item => $item.prop("checked"), wrap: obj => { if ($("#ulProblems .answer input").length < 3 && $("#ulProblems .answer input").eq(0).attr("type") === "radio") { obj.type = 3; obj.options = [ "正确", "错误" ]; } else if ($("#ulProblems .answer input").length > 2 && $("#ulProblems .answer input").eq(0).attr("type") === "radio") { obj.type = 0; } else if ($("#ulProblems .answer input").length > 2 && $("#ulProblems .answer input").eq(0).attr("type") === "checkbox") { obj.type = 1; } }, finished: () => { if ($(".dlg").length) return false; $("#divBtns input:eq(1)").click(); return true; } }); site({ name: "淄博继续教育", match: location.pathname.includes("/practice/start"), root: ".header-left .trueorfalse .sub", elements: { question: ".mb10", options: ".options li", $options: ".options li" }, ignore_click: $item => $item.hasClass("active"), wrap: obj => { obj.type = qtype(obj.$item.parent().prev().text()); obj.options = obj.options.map(i => fmt(i.replaceAll(/[a-zA-z]\)\s+/g, "").replaceAll(/^[a-z]\s+/g, "").replaceAll(/^[a-z]、\s+/g, "").trim())); } }); site({ name: "河北继续教育", match: location.pathname.includes("paperid"), intv: () => $(".examControl").length, root: ".examItem", elements: { question: ".examItemRight .question", options: ".examItemRight ul li span", $options: ".examItemRight ul li" }, ignore_click: $item => $item.hasClass("cur"), wrap: obj => { obj.type = qtype(obj.$item.parent().find(".questTitle b").text()); } }); site({ name: "保定继续教育", match: () => { const pathnameArr = [ "/cuggw/rs/olex_exam", "/hebic/rs/olex_exam", "/sjzkjxy/rs/olex_exam", "/hbfsh/rs/olex_exam", "/jxycu/rs/olex_exam", "/jlufe/rs/olex_exam", "/hbun/rs/olex_exam" ]; return pathnameArr.includes(location.pathname); }, intv: () => $(".paper_body").length, root: ".item_li", elements: { question: ".item_title", options: "ul li label", $options: "ul li input" }, ignore_click($item) { return $item.prop("checked"); }, wrap: obj => { if (obj.$options.length === 2) { obj.type = 3; } else if (obj.$options.length > 2 && obj.$options.eq(0).attr("type") === "radio") { obj.type = 0; } else if (obj.$options.length > 2 && obj.$options.eq(0).attr("type") !== "radio") { obj.type = 1; } else { obj.type = 4; } } }); site({ name: "唐山继续教育", match: location.pathname.includes("/exam/student/exam/"), intv: () => $(".ui-question-group").length, root: ".ui-question-group .ui-question", elements: { question: ".ui-question-title .ui-question-content-wrapper", options: ".ui-question-options .ui-question-content-wrapper", $options: ".ui-question-options .ui-question-options-order" }, wrap: obj => { obj.type = qtype(obj.$item.parent().find("h2").text()); } }); site({ name: "zzcjxy.hnzkw.org.cn", match: location.host.includes("hnzkw.org.cn"), intv: () => $(".answer").length, hook: () => { hookJSON(o => { if (o.data && o.data.bookdatas) { X.json = parsehnzkwText(o.data.bookdatas); } }); }, root: ".examList", elements: { question: ".text", options: ".el-radio-group label,.el-checkbox-group label", $options: ".el-radio-group input,.el-checkbox-group input", type: ".status" }, wrap: obj => { Object.assign(obj, X.json[X.index - 1]); }, fill: (type, answer, $option) => {} }); site({ name: "问卷星考试", match: location.pathname.includes("/exam/ExamRd/Answer"), root: ".g-mn", elements: { question: ".m-question .tigan", options: ".question-block .xuanxiang", $options: ".question-block .xuanxiang", type: ".tixing" }, ignore_click: ($item, type) => { if (type === 1) { return $item.parent().find(".icheckbox_square-green").hasClass("checked"); } else { const isIgnore = $item.parent().find(".iradio_square-green").hasClass("checked"); return isIgnore; } }, wrap: obj => { if ($(".layui-layer-content").length) { ui.tip("答题暂停,请自行通过验证", "warn"); GM_setValue("xc_paused", true); return true; } }, fillFinish: data => { if (data.style === "warning-row" || $(".g-mn").parent().find(".iradio_square-green").hasClass("checked") || data.type === 1) { $('.u-btn-next:contains("下一题")').click(); } }, finished: () => parseInt($(".num-dangqian:last").attr("qindex")) !== $(".num-item").length }); site({ name: "中国石化网络学院", match: location.host.includes("sia.sinopec.com") && location.hash.includes("/exam"), intv: () => $(".queston-item").length && $("[topisshow='0']").length, hook: () => { hookJSON(o => { if (o.responseData && o.responseData.partitions) { X.json = parseShihuaExam(JSON.parse(o.responseData.partitions)).reduce((acc, cur) => acc.concat(cur), []); } }); }, root: ".queston-item>div:has([topisshow='0'])", elements: { question: "h6", options: ".el-radio,.el-checkbox label", $options: ".el-radio,.el-checkbox input" }, wrap: obj => { const idx = parseInt(obj.$item.attr("a")); Object.assign(obj, X.json[isNaN(idx) ? X.index - 1 : idx]); }, ignore_click: $item => $item.prop("checked"), fillFinish: () => { $(".nextQuestion").click(); }, finished: () => $(".nextQuestion").length > 0 }); /* ---------- 启动 ---------- */ try { boot(); } catch (e) { console.warn("[小柴答题] 启动失败", e); } })();