Greasy Fork

Greasy Fork is available in English.

nwpu-pj

西北工业大学-自动评教

当前为 2019-06-13 提交的版本,查看 最新版本

// ==UserScript==
// @name         nwpu-pj
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  西北工业大学-自动评教
// @author       BakerBunker
// @match        http://us.nwpu.edu.cn/eams/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    setInterval(autoPJ,"2000");

    function autoPJ()
    {
        var url=window.location.href;
        if(url=="http://us.nwpu.edu.cn/eams/evaluateStd!loadQuestionnaire.action")
        {
            var pre,post;
            pre="op_";
            post="_24";
            var checkbox;
            for(var i=1;i<=100;i++)
            {
                checkbox=document.getElementById(pre+i+post);
                if(checkbox!=null) checkbox.checked=true;
            }
            document.getElementById("btnSave").click();
        }
    }
})();