AutoRate4iCourse163

网易云课堂自动评作业

目前为 2018-03-19 提交的版本。查看 最新版本

// JavaScript source code
// ==UserScript==
// @name         AutoRate4iCourse163
// @namespace    http://github.com/ducksoft
// @version      0.2
// @description  网易云课堂自动评作业
// @author       DuckSoft & Nekokir
// @match        *://www.icourse163.org/learn/*
// @match        *://www.icourse163.org/spoc/learn/*
// @require      http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js
// ==/UserScript==

(function () {
    'use strict';
    $(function () {
        var mScore;
        $("#courseLearn-inner-box").each(function () {
            $(this).bind("dblclick", function () {
                // choose highest score
                Array.prototype.slice.call(document.getElementsByClassName("s")).forEach(function (e) {
                    mScore = 0;
                    Array.prototype.slice.call(e.getElementsByClassName("j-select")).forEach(function (e1) {
                        mScore = e1.value;
                    });
                    Array.prototype.slice.call(e.getElementsByClassName("j-select")).forEach(function (e1) {
                        if (e1.value == mScore) {
                            e1.checked = true;
                        }
                    });
                });
                // send rubbish comment
                Array.prototype.slice.call(document.getElementsByTagName("textarea")).forEach(function (e) {
                    e.value = "666";
                });
                // auto-post
                document.getElementsByClassName("j-submitbtn")[0].click();
            });
        });
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址