欢迎访问!

Office学习网

您现在的位置是:主页 > 站长知识

站长知识

粉笔网答案

发布时间:2026-09-08站长知识评论
[mw_shl_code=asm,true]// ==UserScript==// @name 粉笔行测答案(修复可运行)// @namespace https://fenbi.com/// @version 2.0// @descripti ...

解决材料题导致的答案移位问题// [url=home.php?mod=spaceuid=195849]@match[/url]*://*.fenbi.com/*// [url=home.php?mod=spaceuid=609072]@grant[/url]GM_addStyle// @run-atdocument-end// ==/UserScript==(async function () {console.log(#9989; 粉笔助手 v7.5 启动 - 纯净对齐模式);GM_addStyle(`#fbHelper {position: fixed; top: 120px; left: 10px; width: 180px;background: #fff; border: 2px solid #165DFF; z-index: 2147483647;padding: 10px; border-radius: 10px; box-shadow: 0 8px 20px rgba(0, [HTML] 纯文本查看 复制代码 #10060; 错误:Unexpected token '',;return;}const res = await fetch(apiEntry.name, { credentials: 'include' });const ansData = await ansRes.json();let ansChoices = [];let html = ;ids.forEach((id) = {const item = ansData.find(a = String(a.id) === String(id));const choice = item ? item.correctAnswer?.choice : null;ansChoices.push(choice);const char = (choice !== null choice !== undefined) ? [A。

{ credentials: 'include' });const data = await res.json();const ids = (data.questions || []).map(q = q.id).filter(id = id);const idsStr = ids.join(', 1500);})(); ,0, 0);stat.innerText = #10024; 填充完成;} catch (e) {list.innerText = #10060; 错误: + e.message;}}setTimeout(createUI,。

D][choice] : ?;html += `div class=ans-item${ansChoices.length}: b${char}/b/div`;});list.innerHTML = html;stat.innerText = 正在 1:1 填充...;// 执行 3 轮滚动扫描, 600));}window.scrollTo(0,这才是真正的题目交互区const questionLists = Array.from(document.querySelectorAll('ul.choice-radios,请刷新, C, .choice-radio');if (options.length correctIdx) {const targetLi = options[correctIdx];// 模拟点击 label 或内部的 input-radioconst clicker = targetLi.querySelector('.input-radio') || targetLi.querySelector('label') || targetLi;clicker.click();// 触发 Angular 状态变更const input = targetLi.querySelector('input');if (input) {input.dispatchEvent(new Event('change', { bubbles: true }));}filledCount++;}}});return filledCount;}async function startWork() {const list = document.getElementById('fbAnsList');const stat = document.getElementById('fbStat');list.innerText = 数据同步中...;try {const ress = performance.getEntriesByType('resource');const apiEntry = ress.find(r = r.name.includes('tiku.fenbi.com/combine/static/exercise') || r.name.includes('tiku.fenbi.com/api/xingce/exercises'));if (!apiEntry) {list.innerText = #10060; 未发现数据,确保懒加载题目被触发for (let i = 0; i 3; i++) {const num = await forceSequenceFill(ansChoices);if (num = ids.length) break;window.scrollBy(0, B, index) = {// index 0 对应第一个 ul (即第1题)。

');const ansRes = await fetch('https://tiku.fenbi.com/api/xingce/questions?ids=' + idsStr,index 1 对应第2题...const correctIdx = ansChoices[index];if (correctIdx !== undefined correctIdx !== null) {// 寻找该 ul 下的第几个 liconst options = ul.querySelectorAll('li.choice-radio,0, .choice-radios'));let filledCount = 0;questionLists.forEach((ul, !doctype ... is not valid JSON 改良一下: [JavaScript] 纯文本查看 复制代码 // ==UserScript==// [url=home.php?mod=spaceuid=170990]@name[/url]粉笔行测助手 v7.5// [url=home.php?mod=spaceuid=467642]@namespace[/url] https://fenbi.com/// [url=home.php?mod=spaceuid=1248337]@version[/url]7.5// @description 强制物理顺序 1:1 对齐, 800);await new Promise(r = setTimeout(r,0.15);}.fb-btn {width: 100%; padding: 8px; background: #165DFF; color: #fff;border: none; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold;}#fbAnsList {max-height: 250px; overflow-y: auto; margin-top: 10px;font-size: 13px; background: #fdfdfd; padding: 5px; border-radius: 5px; border: 1px solid #eee;}.ans-item { display: inline-block; width: 45%; margin: 2px; color: #333; border-bottom: 1px solid #f0f0f0; }.ans-item b { color: #165DFF; }.fb-stat { display: block; text-align: center; font-size: 11px; color: #165DFF; margin-top: 5px; }`);function createUI() {if (document.getElementById('fbHelper')) return;const div = document.createElement('div');div.id = 'fbHelper';div.innerHTML = `div style=font-size:12px;font-weight:bold;color:#165DFF;margin-bottom:6px;text-align:center;粉笔助手 v7.5/divbutton class=fb-btn id=fbRun同步并 1:1 填充/buttonspan id=fbStat class=fb-stat就绪/spandiv id=fbAnsList等待同步.../div`;document.body.appendChild(div);document.getElementById('fbRun').onclick = startWork;}// 强制 1:1 顺序填充async function forceSequenceFill(ansChoices) {// 1. 寻找所有包含选项列表的 ul 容器。

广告位

热心评论

评论列表