Greasy Fork

Greasy Fork is available in English.

全国民办高校党史学习教育知识竞赛练习题脚本

自动做全国民办高校党史学习教育知识竞赛练习题

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         全国民办高校党史学习教育知识竞赛练习题脚本
// @namespace    Zcentury
// @version      1.3
// @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
// ==/UserScript==

(function() {
    'use strict';

    $(document).ready(function() {

        console.log("欢迎使用全国民办高校党史学习教育知识竞赛练习题脚本")
        let html = '<div id="msg" style="border: 1px solid green;background: rgba(190, 247, 153, 0.90);width: 200px;height: 50px;font-size: 20px;position: fixed;top: 0;right: 0;z-index: 9999!important;text-align: center;line-height: 50px;">'
        html += '请选择学校'
        html += '</div>'

        $("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("已答:&nbsp;" + indexNum + "&nbsp;题")
                        } else {
                            $("#msg").html("请手动填写填空题")
                            $("#divNext > a").show()
                        }
                    }, 0);
                }, 0);

            }

        })

    })

})();