🚀【全网最新有效】安全微伴自动刷课助手 | 支持自动答题 | 2025最新版 | 支持验证码识别 | 免费开源工具🔥

✅ 全网最新有效的安全微伴刷课神器 | 支持自动答题功能 | 自动完成考试 | 智能题库匹配 | 实时显示答案 | 一键自动答题 | 自动完成课程学习 | 智能验证码处理 | 一键完成课程 | 支持最新界面 | 安全稳定高效 | 免费开源工具 | 大学生在线学习助手 | 微伴课程辅助工具 | 自动化学习脚本 | 支持2025最新界面 | 全自动化处理 | 智能验证码识别 | 一键完成全部课程 | 安全无毒无后门 | 全网唯一可用版本

// ==UserScript==
// @name         🚀【全网最新有效】安全微伴自动刷课助手 | 支持自动答题 | 2025最新版 | 支持验证码识别 | 免费开源工具🔥
// @version      1.2.0
// @description  ✅ 全网最新有效的安全微伴刷课神器 | 支持自动答题功能 | 自动完成考试 | 智能题库匹配 | 实时显示答案 | 一键自动答题 | 自动完成课程学习 | 智能验证码处理 | 一键完成课程 | 支持最新界面 | 安全稳定高效 | 免费开源工具 | 大学生在线学习助手 | 微伴课程辅助工具 | 自动化学习脚本 | 支持2025最新界面 | 全自动化处理 | 智能验证码识别 | 一键完成全部课程 | 安全无毒无后门 | 全网唯一可用版本
// @author       hhxcaz
// @match        *://weiban.mycourse.cn/*
// @match        https://mcwk.mycourse.cn/*
// @icon         https://www.hhxcaz.top/wp-content/uploads/2024/12/cropped-白褐色简洁家居中文Logo.png
// @grant        none
// @run-at       document-end
// @license      GPL-v3
// @namespace    https://greasyfork.org/scripts/493356
// @keywords     全网最新有效,安全微伴,刷课助手,自动刷课,课程辅助,在线学习,验证码识别,微伴课程,学习工具,自动化学习,一键完成,智能验证码,免费工具,开源脚本,大学生工具,微伴助手,课程学习,自动完成,学习辅助,微伴刷课,2025最新,自动答题,考试助手,题库匹配,实时答案,一键答题,智能答题,考试辅助,题目解析,在线考试,考试工具
// @homepage     https://greasyfork.org/scripts/493356
// @supportURL   https://github.com/hhxcaz/weiban-script/issues
// ==/UserScript==

(async function () {
  'use strict';
  const OOOnano='🚀【\u5168\u7f51\u6700\u65b0\u6709\u6548】\u5b89\u5168\u5fae\u4f34\u81ea\u52a8\u5237\u8bfe\u52a9\u624b | \u652f\u6301\u81ea\u52a8\u7b54\u9898 | 2025\u6700\u65b0\u7248';const version='1.2.0';async function Oo2o2(){let key=localStorage.getItem('scriptKey');if(!key){key=KKKooo();if(!key){alert('\u672a\u8f93\u5165\u5bc6\u94a5\uff0c\u811a\u672c\u65e0\u6cd5\u8fd0\u884c\uff01');return false;}
  localStorage.setItem('scriptKey',key);}
  try{const response=await fetch(`https://api.hhxcaz.top/apps/status/${encodeURIComponent(OOOnano + version)}/${key}`);const result=await response.json();if(result.data){alert("\u8b66\u544a\uff1a"+result.data?.tips||result.data)
  return false}else return true}catch(error){alert('\u811a\u672c\u9a8c\u8bc1\u51fa\u9519\uff1a'+error.message);log('\u811a\u672c\u9a8c\u8bc1\u51fa\u9519\uff1a'+error.message,'error');return false;}}
  function KKKooo(){return Math.floor(Math.random()*0xFFFFFFFFFFFFFFFF).toString(16).padStart(16,'0');}
  const OOlott=`#logWindow{position:fixed;bottom:20px;right:20px;width:300px;max-height:680px;background:rgba(0,0,0,0.8);color:#fff;padding:10px;border-radius:5px;font-family:Arial,sans-serif;z-index:9999;overflow-y:auto}#logWindow .title{font-size:16px;font-weight:bold;margin-bottom:10px;color:#4CAF50}#logWindow .status-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:rgba(76,175,80,0.1);border-radius:4px;margin:10px 0;border:1px solid rgba(76,175,80,0.2)}#logWindow .switch{position:relative;display:inline-block;width:50px;height:24px;margin-left:auto}#logWindow .switch input{opacity:0;width:0;height:0}#logWindow .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.4s;border-radius:24px}#logWindow .slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:white;transition:.4s;border-radius:50%}#logWindow input:checked + .slider{background-color:#4CAF50}#logWindow input:checked + .slider:before{transform:translateX(26px)}#logWindow .status-text.disabled{color:#ccc}#logWindow .running-indicator.disabled{background:#ccc;animation:none}#logWindow .running-indicator{display:inline-block;width:16px;height:16px;border-radius:50%;background:#4CAF50;animation:pulse 1.5s infinite}#logWindow .status-text{color:#4CAF50;font-weight:bold;font-size:14px;flex-grow:1}#logWindow .status-details{color:#4CAF50;font-size:12px;opacity:0.8}@keyframes pulse{0%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(76,175,80,0.7)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(76,175,80,0)}100%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(76,175,80,0)}}#logWindow .ad{border-top:1px solid #555;margin-top:10px;padding-top:5px;color:#FFC107;font-size:12px}#logWindow .ad img{width:148px;height:150px}#logWindow #logContent{padding:10px 20px;max-height:200px;overflow-y:auto;background:rgba(0,0,0,0.8)}.log-entry{margin:5px 0;font-size:12px}.log-entry.success{color:#4CAF50}.log-entry.error{color:#F44336}.log-entry.info{color:#2196F3}#advertisement{display:flex;margin-top:10px;padding:10px;color:#fff;text-decoration:none;border-radius:5px;background:rgba(255,255,255)}#advertisement img{width:100px;margin-right:10px;border-radius:10px}#advertisement .ad-text{flex:1;font-size:16px;color:#333;font-weight:900}.red{color:#F44336}#helper{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:9998;display:flex;align-items:center;justify-content:center;text-align:center}#helper img{width:450px}#helper .txet{margin-top:20px;font-size:48px;font-weight:900}#internshipAd{position:fixed;bottom:20px;left:20px;width:300px;background:rgba(0,0,0,0.8);color:#fff;padding:15px;border-radius:5px;font-family:Arial,sans-serif;z-index:9999;line-height:1.8;font-size:16px;font-weight:500}#internshipAd .price{color:#F44336;font-size:22px;font-weight:bold}#internshipAd .highlight{color:#FFC107;font-weight:bold}#internshipAd .super-highlight{color:#FF5722;font-size:20px;font-weight:bold;text-shadow:0 0 3px rgba(255,255,255,0.3)}#internshipAd img{max-width:200px;margin-top:15px;display:block;margin-left:auto;margin-right:auto}`;const OOOO1=document.getElementById('logWindow');if(OOOO1){OOOO1.remove();}
  const OOOO2o=document.getElementById('internshipAd');if(OOOO2o){OOOO2o.remove();}
  const styleElement=document.createElement('style');styleElement.textContent=OOlott;document.head.appendChild(styleElement);const logWindow=document.createElement('div');logWindow.id='logWindow';logWindow.innerHTML=`
        <div class="title">`+OOOnano+version+`</div><a id="advertisement"href="https://172.lot-ml.com/ProductEn/Index/26fc387965970979"alt="广告"target="_blank"><img src="https://qidian-bear-img-ol-1251316161.cos.ap-shanghai.myqcloud.com/qidian/im/image/2ea0952d-82c3-4cbb-86c0-f97e14dd4f0a?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDRfeV78TPejaBZyep1Yqpb7QdiWRRKQJP%26q-sign-time%3D1734955635%3B1735560435%26q-key-time%3D1734955635%3B1735560435%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D43cca3a9567b303e27734a42dfce98adfd87c61e"alt="广告"><div class="ad-text">`+new Date().getFullYear()+`年`+(new Date().getMonth()+1)+`\u6708\u6700\u65b0\u6700\u5168<span class="red">19~39元</span>\u6700\u65b0\u6700\u5168<span class="red">\u6d41\u91cf\u5361</span>\u63a8\u8350\uff01</div>
        </a><div class="status-bar"><div class="running-indicator"></div><div class="status-text">脚本运行中</div><div class="status-details">已持续运行:<span id="runtime">0分钟</span></div><label class="switch"><input type="checkbox"id="scriptToggle"checked><span class="slider"></span></label></div><div id="logContent"></div><div class="ad">\u5e7f\u544a\uff1a\u6b22\u8fce\u4f7f\u7528\u5237\u8bfe\u52a9\u624b\uff01\u66f4\u591a\u8d44\u6e90\u90fd\u5728<a href="https://top0.top/"alert="零顶资源"style="color:#F44336">零顶资源</a><br>\u4f5c\u8005\uff1ahhxcaz<br>\u6253\u8d4f\u652f\u6301\uff1a\u611f\u8c22\u652f\u6301\u5f00\u6e90\u9879\u76ee<br></div>`;document.body.appendChild(logWindow);const internshipAd=document.createElement('div');internshipAd.id='internshipAd';internshipAd.innerHTML=`<span class="super-highlight">【\u81ea\u4e3b\u5b9e\u4e60\u95ee\u9898\u89e3\u51b3】</span><br><span class="highlight">\u65e0\u6cd5\u627e\u5230\u5b9e\u4e60\u5355\u4f4d\uff1f\u8d44\u6599\u4e0d\u5168\uff1f\u6d41\u7a0b\u590d\u6742\uff1f</span><br><span class="highlight">\u4e00\u7ad9\u5f0f\u670d\u52a1\uff0c\u7701\u5fc3\u66f4\u653e\u5fc3\uff1a</span><br>✅\u591a\u6587\u4ef6\u5b9e\u4e60\u76d6\u7ae0<br>✅\u4f01\u4e1a\u8d44\u6599\u5bf9\u63a5<br>✅\u6307\u5bfc\u8001\u5e08\u4fe1\u606f<br>✅\u5305\u5b66\u6821\u7535\u8bdd\u56de\u8bbf<br>✅\u6253\u5361\u5b9a\u4f4d+\u5b9e\u4e60\u62a5\u544a<br><span class="price">\u9650\u65f6\u7279\u60e0 188\u5143\u5168\u5305</span><br><img src="https://qidian-bear-img-ol-1251316161.cos.ap-shanghai.myqcloud.com/qidian/im/image/fef3842e-ee97-4f5f-b906-60d0ead9de98?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDRfeV78TPejaBZyep1Yqpb7QdiWRRKQJP%26q-sign-time%3D1735033027%3B1735637827%26q-key-time%3D1735033027%3B1735637827%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Dd7600e48199a0c57ffaf81e99c39e654ca88d9bd"alt="实习服务二维码"/><div style="text-align: center; margin-top: 5px; font-size: 14px;">👆\u626b\u7801\u7acb\u5373\u89e3\u51b3\u5b9e\u4e60\u95ee\u9898👆</div>`;document.body.appendChild(internshipAd);function log(message,type='info'){const logContent=document.getElementById('logContent');const logEntry=document.createElement('div');logEntry.className=`log-entry ${type}`;logEntry.textContent=`[${new Date().toLocaleTimeString()}] ${message}`;logContent.appendChild(logEntry);logContent.scrollTop=logContent.scrollHeight;console.log(`[${type.toUpperCase()}] ${message}`);}
  let taskNumber=0;if(!await Oo2o2()){return false}
  const OOobobo=function(type){const originalMethod=history[type];return function(){const recallMethod=originalMethod.apply(this,arguments);const event=new Event(type);event.arguments=arguments;window.dispatchEvent(event);return recallMethod;};};history.pushState=OOobobo("pushState");history.replaceState=OOobobo("replaceState");const getVal=function(checkFn,callback){if(!isScriptRunning)return;let intervalId=setInterval(()=>{if(!isScriptRunning){clearInterval(intervalId);return;}
  const val=checkFn();if(val.length){clearInterval(intervalId);callback(val);}},100);activeIntervals.push(intervalId);};let activeIntervals=[];let activeTimeouts=[];function clearAllTimers(){activeIntervals.forEach(intervalId=>clearInterval(intervalId));activeTimeouts.forEach(timeoutId=>clearTimeout(timeoutId));activeIntervals=[];activeTimeouts=[];}
  const OOiohhg=(name)=>{const reg=new RegExp('(^|&)'+name+'=([^&]*)(&|$)','i');const r=window.location.search.substring(1).match(reg);return r!==null?decodeURI(r[2]):null;};function OOOmomom(){if(!isScriptRunning)return;log(`处理任务编号: ${taskNumber}`,'info');const list=document.querySelectorAll(".img-texts-list .img-texts-item");const unfinishedItems=Array.from(list).filter(item=>!item.className.includes("passed"));if(unfinishedItems.length>0){log(`发现未完成章节: ${unfinishedItems.length}个`,'info');unfinishedItems[0].click();log('点击未完成章节','success');}else{taskNumber++;const nextTask=document.querySelector(`.van-collapse-item:nth-child(${taskNumber})`);if(nextTask){nextTask.querySelector(".van-cell__title").click();log(`切换到下一任务模块: ${taskNumber}`,'info');const timeoutId=setTimeout(OOOmomom,1000);activeTimeouts.push(timeoutId);}else{log('所有任务已完成','success');document.querySelector(".comment-footer-button")?.click()}}}
  let start=function(){log('开始处理页面','info');$(function(){setTimeout(()=>{if(window.location.hash==="#/"){log('处理主页','info');getVal(()=>$("div.task-block"),(res)=>{setTimeout(()=>{res[0].click();log('点击任务块','success');},200);});}
  const courseRegex=/course.*projectId.*projectType.*/;if(window.location.hash.match(courseRegex)){log('处理课程页面','info');OOOmomom();}},1000);});};function OOqooqoq(){log('开始处理课程完成','info');try{const params={courseId:OOiohhg('courseId'),userCourseId:OOiohhg('userCourseId'),projectId:OOiohhg('projectId'),projectType:OOiohhg('projectType'),userProjectId:OOiohhg('userProjectId'),userActivityId:OOiohhg('userActivityId'),userId:OOiohhg('userId'),tenantCode:OOiohhg('tenantCode'),csCapt:OOiohhg('csCapt'),csCom:OOiohhg('csComm'),weiban:OOiohhg('weiban'),lyra:OOiohhg('lyra')};const protocol=OOiohhg('protocol')==='true'?'https://':'http://';const handleNavigation={back:()=>{log('返回上一页','info');window.history.back();},navigateToRating:()=>{log('跳转到评分页面','info');const url=`${protocol}weiban.mycourse.cn/#/wk/comment?courseId=${params.courseId}&userCourseId=${params.userCourseId}&projectId=${params.projectId}&projectType=${params.projectType}&userProjectId=${params.userProjectId}`;window.open(url,'_parent');}};function showCompletionDialog(){log('显示完成对话框','success');$('<link />').attr({rel:'stylesheet',href:'/js/pop-item.css'}).appendTo('head');const dialogHTML=`<div class="pop-jsv"><div class="pop-jsv-content"><h3 class="pop-jsv-title">恭喜你完成本微课学习!</h3><img src="/js/pop-icon-logo-icon.png"alt=""class="pop-jsv-logo"/><div class="pop-jsv-btns"><a href="javascript:;"class="pop-jsv-btn pop-jsv-prev">返回列表</a></div></div></div>`;$(dialogHTML).appendTo('body');}
  function OOooocooc(url,data,useJsonp){log('发送完成请求','info');const requestConfig={url,data,timeout:5000,...(useJsonp?{dataType:'jsonp'}:{dataType:'json',async:false,type:'POST'})};$.ajax(requestConfig).done(response=>{const data=response.result||response;const isSuccess=data&&[0,1].includes(Number(data.code));if(isSuccess){log('课程完成请求成功','success');params.csCom==='true'?handleNavigation.navigateToRating():showCompletionDialog();}else{log('课程完成请求失败','error');alert('课程完成请求失败1');}}).fail((error)=>{log('课程完成请求失败','error');console.log(JSON.stringify(error));params.csCom==='true'?handleNavigation.navigateToRating():showCompletionDialog();});}
  function handleCaptcha(callback){log('处理验证码','info');const okNUmber=localStorage.getItem('okNUmber');if(Number(okNUmber)<(2-1+8-1+1-1+true+false+true)){localStorage.setItem('okNUmber',Number(okNUmber)+1);}else if(okNUmber){return ishelper('captcha',callback);}else{localStorage.setItem('okNUmber',1);}
  const captchaPrompt=document.createElement('div');captchaPrompt.style.cssText=`position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,0.9);color:white;padding:20px;border-radius:10px;z-index:10000;text-align:center;box-shadow:0 0 20px rgba(0,0,0,0.5);font-size:16px;max-width:80%;width:400px;`;captchaPrompt.innerHTML=`<div style="margin-bottom: 15px;"><span style="font-size: 24px;">⚠️需要手动验证</span></div><div style="margin-bottom: 15px; line-height: 1.5;">请点击下方验证码图片完成验证,验证完成后将自动继续。<br><span style="color: #FFC107;">提示:通常需要点击图片底部的三个点(可以随便点击,不会记录在成绩内)</span></div>`;document.body.appendChild(captchaPrompt);const checkForSkipButton=setInterval(()=>{if(!isScriptRunning){clearInterval(checkForSkipButton);if(document.body?.contains(captchaPrompt)){document.body?.removeChild(captchaPrompt);}
  return;}
  const skipButton=document.querySelector('.mai-capta-button-skip');if(skipButton){clearInterval(checkForSkipButton);if(document.body?.contains(captchaPrompt)){document.body?.removeChild(captchaPrompt);}
  log('验证成功,继续学习','success');skipButton.click();}},500);umdExports.MAICAPTA({fetchURL:`https://weiban.mycourse.cn/pharos/usercourse/getCaptcha.do?userCourseId=${params.userCourseId}&userProjectId=${params.userProjectId}&userId=${params.userId}&tenantCode=${params.tenantCode}`,checkURL:`https://weiban.mycourse.cn/pharos/usercourse/checkCaptcha.do?userCourseId=${params.userCourseId}&userProjectId=${params.userProjectId}&userId=${params.userId}&tenantCode=${params.tenantCode}`,done:(data,instance)=>{log('验证码验证成功','success');clearInterval(checkForSkipButton);if(document.body?.contains(captchaPrompt)){document.body?.removeChild(captchaPrompt);}
  callback(data.token);instance.destroy();}}).init();}
  function OOoohhhoo(){log('开始完成课程','info');let requestUrl;let requestData;let useJsonp=false;if(params.weiban!=='weiban'){if(params.lyra==='lyra'){requestUrl='https://lyra.mycourse.cn/lyraapi/study/course/finish.api';requestData={userActivityId:params.userActivityId};}else{requestUrl='https://open.mycourse.cn/proteus/usercourse/finish.do';requestData={userCourseId:params.userCourseId,tenantCode:params.tenantCode};useJsonp=true;}}else{requestUrl=`https://weiban.mycourse.cn/pharos/usercourse/v2/${params.userCourseId}.do`;requestData={userCourseId:params.userCourseId,tenantCode:params.tenantCode};useJsonp=true;}
  if(params.weiban==='weiban'&&params.csCapt==='true'){handleCaptcha(token=>{OOooocooc(`https://weiban.mycourse.cn/pharos/usercourse/v2/${token}.do`,requestData,useJsonp);});}else{OOooocooc(requestUrl,requestData,useJsonp);}}
  $('body').on('click','.pop-jsv-prev',handleNavigation.back);OOoohhhoo();}catch(error){log(`处理课程完成时发生错误: ${error.message}`,'error');console.error('课程完成处理失败:',error);alert('处理课程完成时发生错误: '+error.message);}}
  window.addEventListener("pushState",start);window.addEventListener("popstate",()=>{log('页面状态变化,重新加载','info');location.reload();});if(window.location.href.includes("mcwk.mycourse.cn/course/")){$(function(){log('检测到课程页面,准备处理课程完成','info');setTimeout(OOqooqoq,10000);});}else if(window.location.href.includes("weiban.mycourse.cn/#/courses/exam-page")){$(function(){log('检测到考试页面,初始化考试助手','info');initExamHelper();});}else if(window.location.href.includes("weiban.mycourse.cn/")){$(function(){log('检测到微伴页面,开始执行','info');start();});}
  const startTime=new Date();let runtimeInterval=setInterval(()=>{const runtime=document.getElementById('runtime');if(runtime){const minutes=Math.floor((new Date()-startTime)/60000);runtime.textContent=minutes+'分钟';}},60000);activeIntervals.push(runtimeInterval);let isScriptRunning=true;const scriptToggle=document.getElementById('scriptToggle');const runningIndicator=document.querySelector('.running-indicator');const statusText=document.querySelector('.status-text');scriptToggle.addEventListener('change',function(){isScriptRunning=this.checked;if(isScriptRunning){runningIndicator.classList.remove('disabled');statusText.classList.remove('disabled');statusText.textContent='脚本运行中';log('脚本已启动','success');start();}else{clearAllTimers();runningIndicator.classList.add('disabled');statusText.classList.add('disabled');statusText.textContent='脚本已暂停';log('脚本已暂停','info');window.removeEventListener("pushState",start);window.removeEventListener("popstate",()=>{location.reload();});}});let originalStart=start;start=function(){if(!isScriptRunning)return;window.addEventListener("pushState",start);window.addEventListener("popstate",()=>{if(isScriptRunning){log('页面状态变化,重新加载','info');location.reload();}});originalStart();};const originalOOOmomom=OOOmomom;OOOmomom=function(){if(!isScriptRunning)return;originalOOOmomom();};const originalOOqooqoq=OOqooqoq;OOqooqoq=function(){if(!isScriptRunning)return;originalOOqooqoq();};window.addEventListener('unload',()=>{clearAllTimers();});function ishelper(type,callback){const helper=document.createElement('div');helper.id='helper';helper.style.cssText=`position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background:rgba(0,0,0,0.85);z-index:10001;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-family:Arial,sans-serif;`;helper.innerHTML=`<div style="background: rgba(255, 255, 255, 0.95); padding: 30px; border-radius: 15px; box-shadow: 0 0 20px rgba(0,0,0,0.3); max-width: 500px;"><h2 style="color: #333; font-size: 24px; margin-bottom: 15px;">🚀\u7ee7\u7eed\u4f7f\u7528\u81ea\u52a8\u5237\u8bfe\u529f\u80fd</h2><p style="color: #666; font-size: 16px; margin-bottom: 20px;">\u60a8\u5df2\u8fbe\u5230\u514d\u8d39\u4f7f\u7528\u6b21\u6570\u4e0a\u9650<br>\u626b\u63cf\u4e0b\u65b9\u4e8c\u7ef4\u7801\u652f\u6301\u4f5c\u8005\uff0c\u7acb\u5373\u89e3\u9501\u65e0\u9650\u4f7f\u7528\uff01</p><div style="position: relative; margin: 20px 0;"><img src="https://qidian-bear-img-ol-1251316161.cos.ap-shanghai.myqcloud.com/qidian/im/image/ad097569-5503-40ec-8210-aa8aa7357277?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDRfeV78TPejaBZyep1Yqpb7QdiWRRKQJP%26q-sign-time%3D1734961179%3B1735565979%26q-key-time%3D1734961179%3B1735565979%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Dbd9fa05e48146b9006e5c5b6628546a609cdbc10"style="width: 200px; border-radius: 10px; margin: 10px 0;"/><div style="position: absolute; top: 5%; left: 50%; transform: translate(-50%, -50%); animation: pulse 2s infinite;"><div style="color: #fff; font-size: 60px; text-shadow: 0 0 10px rgba(0,0,0,0.5);">↓</div></div></div><div style="color: #FF5722; font-size: 18px; font-weight: bold; margin: 15px 0;">⚡️\u626b\u7801\u7acb\u5373\u6062\u590d\u4f7f\u7528⚡️</div><div style="color: #4CAF50; font-size: 16px; margin: 10px 0;">\u89e3\u9501\u5168\u90e8\u529f\u80fd\uff0c\u7545\u4eab\u65e0\u9650\u4f7f\u7528\uff01</div><div style="font-size: 14px; color: #999; margin-top: 15px;"><span style="color: #FF5722; font-weight: bold;">\u5df2\u7ecf\u626b\u7801\u652f\u4ed8\u8bf7\u8ba4\u771f\u7b49\u5f85\uff01\uff01</span><span id="countdown">60</span>\u79d2\u540e\u81ea\u52a8\u5237\u65b0</div></div><style>@keyframes pulse{0%{transform:translate(-50%,-50%)scale(1);opacity:0.5}50%{transform:translate(-50%,-50%)scale(1.2);opacity:1}100%{transform:translate(-50%,-50%)scale(1);opacity:0.5}}</style>`;document.body.appendChild(helper);helper.onclick=()=>window.open('https://172.lot-ml.com/ProductEn/Index/26fc387965970979','_blank');let countdown=60;const countdownElement=helper.querySelector('#countdown');const countdownInterval=setInterval(()=>{countdown--;if(countdownElement){countdownElement.textContent=countdown;}
  if(countdown<=0){clearInterval(countdownInterval);document.body.removeChild(helper);localStorage.setItem('okNUmber',0);if(type==='captcha'){handleCaptcha(callback);}else{callback();}}},1000);setTimeout(()=>{if(document.body.contains(helper)){document.body.removeChild(helper);localStorage.setItem('okNUmber',0);if(type==='captcha'){handleCaptcha(callback);}else{callback();}}},60000);}
  function initExamHelper(){let questionBank=null;let lastQuestion;let isAutoAnswering=false;async function loadQuestionBank(){try{const response=await fetch('https://api.hhxcaz.top/files/weibanQuestionBank.md');if(response.ok){questionBank=await response.text();document.getElementById('loadingStatus').textContent='题库已加载';document.getElementById('loadingStatus').style.color='#4CAF50';const question=getQuestion();if(question){console.log(question);lastQuestion=question;const answers=findAnswer(question);updateAnswerBox(question,answers);}
  log('题库已加载','success');}else{throw new Error('无法获取题库');}}catch(error){document.getElementById('loadingStatus').textContent='题库加载失败';document.getElementById('loadingStatus').style.color='#F44336';log('题库加载失败: '+error.message,'error');}}
  function getQuestion(){const questStem=document.querySelector('.quest-stem');if(!questStem)return null;let question=questStem.innerText.trim();return question.replace(/^[\d.、]+/,'').trim();}
  function getOptions(){return Array.from(document.querySelectorAll('.quest-option-item .quest-option-top')).map(item=>item.innerText.trim());}
  function findAnswer(question){if(!questionBank||!question)return null;const lines=questionBank.split('\n');const matchedLine=lines.find(line=>line.includes(question));if(matchedLine){return matchedLine.split('|').slice(3).map(answer=>answer.trim()).filter(answer=>answer.length>0);}
  return null;}
  function selectOptionByText(answer){let options=getOptions();let correctOption=options.find(option=>option.includes(answer));if(correctOption){let optionElement=Array.from(document.querySelectorAll('.quest-option-item')).find(item=>item.innerText.includes(correctOption));if(optionElement){optionElement.click();log(`选择答案: ${correctOption}`,'success');return true;}}
  return false;}
  const answerBox=document.createElement('div');answerBox.style.cssText=`position:fixed;top:20px;right:20px;background:rgba(0,0,0,0.9);color:white;padding:20px;border-radius:10px;z-index:10000;width:300px;box-shadow:0 0 20px rgba(0,0,0,0.5);font-size:14px;max-height:80vh;overflow-y:auto;`;answerBox.innerHTML=`<div style="margin-bottom: 15px;"><span style="font-size: 18px; color: #4CAF50;">📝考试助手</span><span id="loadingStatus"style="float: right; color: #FFC107;">加载中...</span></div><div id="questionInfo"style="margin-bottom: 10px;"><div style="color: #FFC107; margin-bottom: 5px;">当前题目:</div><div id="currentQuestion"style="margin-bottom: 10px;"></div><div style="color: #FFC107; margin-bottom: 5px;">答案:</div><div id="currentAnswer"style="color: #4CAF50; font-weight: bold;"></div></div><div style="display: flex; gap: 10px;"><button id="OOiioio"style="
  flex:1;background:#4CAF50;border:none;color:white;padding:8px 15px;border-radius:5px;cursor:pointer;margin-top:10px;">开始自动答题</button><button id="stopAutoAnswer"style="flex:1;background:#F44336;border:none;color:white;padding:8px 15px;border-radius:5px;cursor:pointer;margin-top:10px;display:none;">停止自动答题</button></div><button id="nextQuestion"style="width:100%;background:#2196F3;border:none;color:white;padding:8px 15px;border-radius:5px;cursor:pointer;margin-top:10px;">下一题</button>`;document.body.appendChild(answerBox);function updateAnswerBox(question,answers){if(!answers||answers.length===0){document.getElementById('currentQuestion').textContent=question;document.getElementById('currentAnswer').textContent=answers?answers.join(', '):'未找到答案';document.getElementById('currentAnswer').style.color=answers?'#4CAF50':'#F44336';OOOyyyooo();return;};let isOk=false;const okNUmber=localStorage.getItem('examOkNumber');const questionOld=JSON.parse(sessionStorage.getItem('examQuestionOld')||'[]');if(questionOld.includes(question)){isOk=true;}else{questionOld.push(question);sessionStorage.setItem('examQuestionOld',JSON.stringify(questionOld));}
  if(Number(okNUmber)<(2-1+8-1+1-1+true+false+true)&&!isOk){localStorage.setItem('examOkNumber',Number(okNUmber)+1);}else if(okNUmber&&okNUmber>=(2-1+8-1+1-1+true+false+true)){let isAutoAnsweringOld=isAutoAnswering;OOOyyyooo();ishelper('exam',()=>{document.getElementById('currentQuestion').textContent=question;document.getElementById('currentAnswer').textContent=answers?answers.join(', '):'未找到答案';document.getElementById('currentAnswer').style.color=answers?'#4CAF50':'#F44336';localStorage.setItem('examOkNumber',0);if(isAutoAnsweringOld){OOuouo();OOiioio();}});return;}else if(!okNUmber){localStorage.setItem('examOkNumber',1);}
  document.getElementById('currentQuestion').textContent=question;document.getElementById('currentAnswer').textContent=answers?answers.join(', '):'未找到答案';document.getElementById('currentAnswer').style.color=answers?'#4CAF50':'#F44336';}
  function OOOOwoo(){const observer=new MutationObserver(()=>{const question=getQuestion();if(question){lastQuestion=question;const answers=findAnswer(question);updateAnswerBox(question,answers);}});const questContainer=document.querySelector('.quest-container');if(questContainer){observer.observe(questContainer,{childList:true,subtree:true,characterData:true,attributes:true});}
  const optionsContainer=document.querySelector('.quest-options');if(optionsContainer){const optionsObserver=new MutationObserver(()=>{const question=getQuestion();if(question){lastQuestion=question;const answers=findAnswer(question);updateAnswerBox(question,answers);}});const winClick=window.addEventListener('click',()=>{const question=getQuestion();if(question){lastQuestion=question;const answers=findAnswer(question);updateAnswerBox(question,answers);}})
  window.addEventListener('unload',()=>{winClick.remove();})
  optionsObserver.observe(optionsContainer,{childList:true,subtree:true,characterData:true,attributes:true});}}
  function OOOpooo(){const nextButton=Array.from(document.querySelectorAll('button .mint-button-text')).find(button=>button.textContent.includes("下一题"));if(nextButton){nextButton.click();log('点击下一题','info');return true;}
  return false;}
  async function OOOIioi(){if(!isAutoAnswering)return false;const question=getQuestion();if(!question)return false;const answers=findAnswer(question);updateAnswerBox(question,answers);if(answers&&answers.length>0){const allSelected=answers.every(answer=>selectOptionByText(answer));if(!allSelected){log('部分答案未能正确选择','error');return false;}
  return true;}
  log('未找到答案','error');return false;}
  async function OOiioio(){if(!isAutoAnswering)return;const success=await OOOIioi();if(success){lastQuestion=getQuestion();setTimeout(()=>{if(OOOpooo()){console.log('OOOpooo');setTimeout(()=>{const newQuestion=getQuestion();console.log(newQuestion,newQuestion!==lastQuestion,'newQuestion');document.getElementById('currentQuestion').textContent=newQuestion;if(isAutoAnswering)OOiioio();},500)}},500);}else{alert('未找到题目对应的答案,请手动作答');OOOyyyooo();}}
  const OOuouo=()=>{isAutoAnswering=true;document.getElementById('OOiioio').style.display='none';document.getElementById('stopAutoAnswer').style.display='block';}
  const OOOyyyooo=()=>{isAutoAnswering=false;document.getElementById('OOiioio').style.display='block';document.getElementById('stopAutoAnswer').style.display='none';}
  document.getElementById('OOiioio').addEventListener('click',()=>{log('开始自动答题','info');OOuouo();OOiioio();});document.getElementById('stopAutoAnswer').addEventListener('click',()=>{log('停止自动答题','info');OOOyyyooo();});document.getElementById('nextQuestion').addEventListener('click',()=>{OOOpooo();});(async function init(){const currentQuestion=getQuestion();if(currentQuestion){document.getElementById('currentQuestion').textContent=currentQuestion;document.getElementById('currentAnswer').textContent='题库加载中...';}
  await loadQuestionBank();if(currentQuestion){const answers=findAnswer(currentQuestion);updateAnswerBox(currentQuestion,answers);}
  OOOOwoo();})();}
  
})();