蒙就完事了
// ==UserScript==
// @name 人卫慕课瞎几把蒙
// @namespace https://qinlili.bid/
// @version 0.2
// @description 蒙就完事了
// @author 琴梨梨
// @match http://tk.pmphmooc.com/memberFront/paper.zhtml?*
// @icon http://tk.pmphmooc.com/favicon.ico
// @grant none
// @license WTFPL
// ==/UserScript==
(function() {
'use strict';
//allA:全部选A;random:随机
const selectMode="allA"
document.getElementById("beginBtn").click();
const random=(min, max)=> {
return Math.round(Math.random() * (max - min)) + min;
}
[].forEach.call(document.getElementsByTagName("dd"),single=>{
switch(selectMode){
case "random":{
let list=single.getElementsByTagName("input");
list[random(1,list.length)-1].click()
break
};
case"allA":{
let list=single.getElementsByTagName("input");
list[0].click();
break
}
}
})
document.querySelector("#buttons_ > span:nth-child(2) > input").click();
document.querySelector("#z-dialog-1-OKButton").click();
})();