// ==UserScript== // @name nwpu-pj // @namespace http://tampermonkey.net/ // @version 0.2.1 // @description 西北工业大学-评教 // @author You // @match http://us.nwpu.edu.cn/eams/* // @grant none // @downloadURL none // ==/UserScript== (function() { autoPJ(); function autoPJ() { var url = window.location.href; if (url == "http://us.nwpu.edu.cn/eams/evaluateStd!search.action" || url == "http://us.nwpu.edu.cn/eams/evaluateStd!save.action") { var table = document.getElementsByClassName('gridtable')[0].children[1]; for (const element of table.children) { if (element.children[4].innerText == '未评教') { var k = element.children[5]; k.children[0].click(); break; } } } else if (url == "http://us.nwpu.edu.cn/eams/evaluateStd!loadQuestionnaire.action") { var pre, post; pre = "op_"; post = "_44"; var checkbox; for (var i = 0; i <= 200; i++) { checkbox = document.getElementById(pre + i + post); if (checkbox != null) checkbox.checked = true; } document.getElementById("btnSave").click(); } setTimeout(autoPJ, "2000"); } })();