DNUI;vpn

配套插件

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

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

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

(I already have a user style manager, let me install it!)

// ==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("选择完毕");
});