您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
方便快速地在学习通中回顾已批改的选择题、判断题
当前为
// ==UserScript== // @name 学习通快速看题 // @namespace https://trudbot.cn/ // @version 0.1 // @description 方便快速地在学习通中回顾已批改的选择题、判断题 // @author trudbot // @match *://*.chaoxing.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=chaoxing.com // @grant none // @license GPL-2.0-only // ==/UserScript== (function () { let qs = document.getElementsByClassName('questionLi'); for (let q of qs) { let option = q.getElementsByClassName('mark_letter')[0].getElementsByTagName('li'); let answerContainer = q.getElementsByClassName('mark_answer')[0]; let answer = answerContainer.querySelectorAll("span.colorGreen")[0]; // console.log(answer.innerHTML); function getAnswer(s) { for (let c of s.innerHTML) { if (c >= 'A' && c <= 'D') { switch (c) { case 'A': return 0; case 'B': return 1; case 'C': return 2; case 'D': return 3; } } } return -1; } let id = getAnswer(answer); // console.log(id); if (id === -1 || id >= option.length) { // alert("error!"); answerContainer.getElementsByClassName('mark_score')[0].style.display = 'none'; for (let d of answerContainer.getElementsByClassName('colorDeep')) { d.style.display = 'none'; } } else { let correctOption = option[id]; //correctOption.setAttribute('class', 'colorGreen'); correctOption.style.backgroundColor = '#00B86E'; answerContainer.style.display = 'none'; } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址