Greasy Fork is available in English.

JLU评教系统小助手

JLU教务评教系统的优化脚本

// ==UserScript==
// @name        JLU评教系统小助手
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  JLU教务评教系统的优化脚本
// @author       JLUer
// @match        https://uims.jlu.edu.cn/ntms/page/eval/eval_detail_160.html?eitem=*
// @match        https://vpns.jlu.edu.cn/https/77726476706e69737468656265737421e5fe4c8f693a6445300d8db9d6562d/ntms/page/eval/eval_detail_150.html?eitem=*
// @grant        none
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// ==/UserScript==

ImportCss();
ScriptWithJquery();


function ImportCss() {
    var jqueryScriptBlock = document.createElement('style');
    jqueryScriptBlock.type = 'text/css';
    jqueryScriptBlock.innerHTML = "#fast_eval{position:fixed;bottom:50%;left:1px;border:1px solid gray;padding:3px;width:12px;font-size:12px;cursor:pointer;border-radius: 3px;}";
    document.getElementsByTagName('head')[0].appendChild(jqueryScriptBlock);
   ntms.widget._AutoTimer.prototype._static.MIN_INTERVAL_MS=0
}


function ScriptWithJquery() {
    //var Eval=["11","12","14","15","21","22","23","31","32","33","41","42","43","51","52"],EvalException = ["prob13", "sat6", "mulsel71", "prob73"],ExceptionVal = ["N", "A", "K", "Y"];
    var Eval=["01","02","03","04","05","06","07","08","09","10"],
        EvalException = ["sat11","sat12","p12"],ExceptionVal = ["A","A","C"];
     $(document.body).append("<div id='fast_eval'>一键好评</div>");
     $('#fast_eval').click(function () {
         Eval.forEach(function(a,n,arr){
             $("input[name='p"+a+"'][value='A']").click();
         });
         EvalException.forEach(function(a,n,arr){
             $("input[name='"+a+"'][value='"+ExceptionVal[n]+"']").click();
         });
         alert("填写完成!");
     });
}