我是宪法小标兵!!

宪法答题自动练习(100%正确率但不支持考试)

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         我是宪法小标兵!!
// @namespace    XFDT2020
// @version      0.2.2024
// @description  宪法答题自动练习(100%正确率但不支持考试)
// @author       PY-DNG
// @include      *://static.qspfw.moe.gov.cn/xf2024/learning-page.html*
// @include      *://static.qspfw.moe.gov.cn/xf2024/learn-practice.html*
// @grant        GM_setValue
// @grant        GM_getValue
// ==/UserScript==

(function() {
    'use strict';

    if (location.href.indexOf('learning-page') != -1) {
        if (document.querySelector('#afterClassPractice')) {
            toExam();
        }
        return;
    }


    const red = "rgb(217, 0, 27)";
    const green = "rgb(2, 155, 90)";

    //examTime = 100000;
    let choices, question, answer;
    let i, j, curNum, totalNum;
    curNum = Math.floor(document.querySelector('#currentTopic').innerHTML);
    totalNum = Math.floor(document.querySelector('#totalTopic').innerHTML);

    for (j = curNum; j <= totalNum; j++) {
        choices = document.querySelectorAll('.prev');
        choices['ABCD'.indexOf(questionBank_answer)].click();
        nextQuestion();
    }
    nextExam();
})();