Greasy Fork is available in English.

郑州大学远程教育章节测试自动答题

打开章节测试题后会主动进行答题,2分钟后会自动提交;如果一个章节多少提交后不显示正确答案,请谨慎使用,可能服务出现问题

< Обсуждения 郑州大学远程教育章节测试自动答题

Отзыв: Хороший — скрипт работает как нужно

Deleted user 894547
§
Создано: 28.03.2022
Отредактировано: 28.03.2022

郑大测试(打开章节测试题后会主动进行答题)2022-03-28



// ==UserScript==
// @name         郑大测试(打开章节测试题后会主动进行答题)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include      http://ols.v.zzu.edu.cn/xsd/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function to_testmess(){
        console.log('-----');
        [...document.querySelectorAll('.testdire_cuon__3LUPV')].forEach(v=>{const temp = v.querySelector('.ant-collapse-header');!v.querySelector('.ant-collapse-content-active') && temp.click()});
        const temp = [...document.querySelectorAll('.testdire_list__1ldxL')].map(v=>v.querySelector('.ant-btn-background-ghost')).filter(v=>v)
        if(temp && temp.length){
            temp[0] && temp[0].click();
        }
    };
    function to_testsub(){
        document.querySelector('.testmess_main__15rlg').querySelector('a').click()
    }
    function to_testdire(){
        location.href = 'http://ols.v.zzu.edu.cn/xsd/#/index/testdire'
    }
    setInterval(()=>{
        const locHref= location.href
        if(locHref.includes('/index/testdire')){
            to_testmess();
        }else if(locHref.includes('/index/testmess')){
            to_testsub();
        }else if(locHref.includes('/index/testsub')){
            if(document.querySelector('.testsub_look__1aSpA')){
                to_testdire();
            }
        }
    },1000);


    // Your code here...
})();

进入错题的暂时没有进行判断

Ответить

Войдите, чтобы ответить.