您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
模拟考试的答案在页面里。
当前为
// ==UserScript== // @name 上海市大学生安全教育在线 - 自动答题(模拟考试版) // @description 模拟考试的答案在页面里。 // @version 1 // @namespace UnKnown // @author UnKnown // @match http://www.halnedu.com/pcexam/test/start // @grant none // @run-at document-end // ==/UserScript== (() => { const clickAnswer = (question, answer) => question.querySelector('input[value="' + answer + '"]').click(); document.querySelectorAll('#q1 .question, #q2 .question').forEach( question => clickAnswer(question, question.getAttribute('as')) ); const MCQ = document.getElementById('q3'); MCQ.querySelectorAll('li.active').forEach( li => { li.classList.remove("active"); li.querySelector(':scope > input').checked = false; } ); MCQ.querySelectorAll('.question').forEach( question => question.getAttribute('as').split("").forEach( answer => clickAnswer(question, answer) ) ); })(); // Show right answer ((onHover = false) => { const answerStyle = document.createElement("style"); answerStyle.textContent = (onHover ? '.box .question:hover ' : "") + '.answer {display: block !important}'; document.head.appendChild(answerStyle); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址