您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
广东海洋大学一键评教
// ==UserScript== // @name 海大一键评教 // @namespace https://github.com/A0150315 // @version 0.2 // @description 广东海洋大学一键评教 // @author 谭健青 // @match *://210.38.137.126:8016/* // @match *://210.38.137.125:8016/* // @match *://210.38.137.124:8016/* // @match *://210.38.137.79:8016/* // @grant none // ==/UserScript== (function() { 'use strict'; function autoComplete(select, ...args) { if (select.name.indexOf('DataGrid') > -1) { select.value = randomBetweenANB(); } return select; } function randomBetweenANB(...args) { return parseInt((Math.random() * 10)) % 2 === 0 ? 'A' : 'B'; } function isLastItem(...args){ let pjkc=document.querySelector('#pjkc'); if(pjkc){ const selectedIndex=document.querySelector('#pjkc').options.selectedIndex; const selectionLength=document.querySelector('#pjkc').options.length; if(selectedIndex===selectionLength-1){ return true; } return false; } } function getAllSelectionNCompleteIt(...args) { let selects = document.getElementsByTagName('select'); let pjxx = document.getElementById('pjxx'); let Button1 = document.querySelector('#Button1'); const Button2 = document.querySelector('#Button2'); if (selects) { if(isLastItem()){ if(Button2.value===' 提 交 '){ Button2.click(); } alert('已完成评教'); return true; } [].forEach.call(selects, autoComplete); if (pjxx) { pjxx.value = '谢谢老师悉心指导!'; } if (Button1 && Button2) { Button1.click(); } } return true; } const TextBox2=document.querySelector("#TextBox2"); if(TextBox2){ TextBox2.style.display='block'; return true; } getAllSelectionNCompleteIt(); })();