DNUI;vpn

配套插件

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name DNUI;vpn
// @namespace    http://tampermonkey.net/
// @description  配套插件
// @version      0.2
// @include      http://hw-neusoft-edu-cn.portal.neutech.com.cn/hw/exercise/*
// @match        *://hw-neusoft-edu-cn.portal.neutech.com.cn/hw/exercise/exercise.do*
// ==/UserScript==
$(function () {
        function getParameter(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = location.search.substr(1).match(reg);
            if (r != null) return (r[2]); return null;
        }
        var eid = getParameter("eid");
        var sj = "semester=1&eid=" + eid;
        $.ajax({
            type: 'post',
            url: 'getQuestList.do',
            data: sj,
            cache: false,
            dataType: 'json',
            success: function (data) {
                var string = "";
                var ans = data.list;
                for (var i = 0; i < ans.length; i++) {

                    $.ajax({
                        type: "POST",
                        url: "http://hw-neusoft-edu-cn.portal.neutech.com.cn/hw/exercise/saveoa.do",
                        data: {
                            qt_id: ans[i].qt_id,
                            qid: ans[i].qid,
                            objectiveanswer: ans[i].answer,
                            position: i + 1,
                            eid: eid,
                        },
                    })
                }
            }
        });
    //  alert("选择完毕");
});