Greasy Fork

Greasy Fork is available in English.

超星网课助手(测试版)

自动答题课程任务的测验,支持单选、多选、判断、填空题,不支持简答题和自动提交

当前为 2020-12-05 提交的版本,查看 最新版本

// ==UserScript==
// @name         超星网课助手(测试版)
// @namespace    [email protected]
// @version      0.1.0
// @description  自动答题课程任务的测验,支持单选、多选、判断、填空题,不支持简答题和自动提交
// @author       wyn665817
// @match        *://mobilelearn.chaoxing.com/widget/pcvote/goStudentVotePage*
// @run-at       document-end
// @grant        unsafeWindow
// ==/UserScript==

var $ = unsafeWindow.jQuery;

$('.StudentTimu').each(function(index) {
    var ans = unsafeWindow.questionlist[index].answer;
    $(':radio, :checkbox', this).each(function(num) {
        ans[num].isanswer && this.click();
    });
    $(':text', this).val(function(num) {
        return $(ans[num].content).text().trim();
    });
});