// ==UserScript==
// @name 全国民办高校党史学习教育知识竞赛练习题脚本
// @namespace Zcentury
// @version 1.1
// @description 自动做全国民办高校党史学习教育知识竞赛练习题
// @author Zcentury
// @match *://ks.wjx.top/*
// @icon https://cdn.Zcentury.top/Image/favicon.ico
// @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js
// @grant none
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
console.log("欢迎使用全国民办高校党史学习教育知识竞赛练习题脚本")
let html = '
'
html += '请选择学校'
html += '
'
$("body").append(html);
let indexNum = 0
$("body").on('click', 'a, td', function() {
if ($(this).attr('class') == 'button white') {
let el = $(".fieldset[style='']")
$("#divNext > a").hide()
setTimeout(() => {
let title = el.find('div.field-label').html()
let radio = el.find('.ui-controlgroup .ui-radio[ans="1"]')
let checkbox = el.find('.ui-controlgroup .ui-checkbox[ans="1"]')
if (checkbox.length > 0) {
checkbox.click()
} else {
radio.click()
}
indexNum++
setTimeout(() => {
if (indexNum <= 90) {
$("#divNext > a").click()
$("#msg").html("已答: " + indexNum + " 题")
} else {
$("#msg").html("请手动填写填空题")
$("#divNext > a").show()
}
}, 100);
}, 100);
}
})
})
})();