Greasy Fork is available in English.

普法小助手

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

// ==UserScript==
// @name         普法小助手
// @namespace    PF2021
// @version      0.1
// @description  普法答题自动练习(100%正确率但不支持考试)
// @author       雅迅达网络
// @include      https://static.qspfw.moe.gov.cn/xf2021/learn_practice_list.html*
// @include      https://static.qspfw.moe.gov.cn/xf2021/learning-page.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();
})();