// ==UserScript== // @name 正方教育期末自动填教师评价表 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 加建好评,减键差评 // @author 德川振威 // @match http://jwgl.witpt.edu.cn/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @downloadURL none // ==/UserScript== (function () { let t,y,n,s,d; t = document.getElementById('lblPjs') t.innerText = "启动成功,加键好评,减键差评,点击内框按下按键,有提示表示成功,卡住不跳转是网站反应慢的原因" t.style.color = "#ff0000" t.style.fontSize = "20px" document.onkeydown = function(e) { if (e.key === '+') { auto('A', 'B') alert('好评填写完毕,确定后自动跳转'); document.getElementById('Button1').click() } if (e.key === '-') { auto('C', 'D') alert('差评填写完毕,确定后自动跳转'); document.getElementById('Button1').click() } } function auto(one, two){ s = 2 d = 19 let select; while (s <= 19) { select = 'DataGrid1__ctl' + s.toString() + '_JS1' if (s %2 === 0){ document.getElementById(select).value = one; } else { document.getElementById(select).value = two; } s++; } } })();