正方教务教学评价填写(需手动提交)
// ==UserScript==
// @name 正方教务教学评价填写(需手动提交)
// @namespace https://bbs.tampermonkey.net.cn/
// @version 0.2.0
// @description 广西职师院专供
// @author JHPatchouli
// @match https://jw.gxvnu.edu.cn/jwglxt/xspjgl/xspj_cxXspjIndex.html*
// ==/UserScript==
(function () {
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay));
let divObj = document.createElement('div');
divObj.innerHTML = '<button id="btna" style="width: 80px;height: 40px;">很满意</button>';
divObj.innerHTML += '<button id="btnb" style="width: 80px;height: 40px;">满意</button>';
divObj.innerHTML += '<button id="btnc" style="width: 80px;height: 40px;">一般</button>';
divObj.innerHTML += '<button id="btnd" style="width: 80px;height: 40px;">不满意</button>';
divObj.innerHTML += '<button id="btne" style="width: 80px;height: 40px;">很不满意</button>';
divObj.style = "position: fixed;z-index: 999;top: 0px;margin: 0px auto;text-align: center;width: 1900px;";
//把div添加到body作为他的子元素
document.body.appendChild(divObj);
btna.addEventListener('click', async function () {
var doc = document.getElementsByClassName("radio-pjf");
var docle = doc.length;
for (let i = 0; i < docle; i += 5) {
const elemen = doc[i];
elemen.checked = "true";
}
await sleep(4000);
})
btnb.addEventListener('click', async function () {
var doc = document.getElementsByClassName("radio-pjf");
var docle = doc.length;
for (let i = 1; i < docle; i += 5) {
const elemen = doc[i];
elemen.checked = "true";
}
await sleep(4000);
})
btnc.addEventListener('click', async function () {
var doc = document.getElementsByClassName("radio-pjf");
var docle = doc.length;
for (let i = 2; i < docle; i += 5) {
const elemen = doc[i];
elemen.checked = "true";
}
await sleep(4000);
})
btnd.addEventListener('click', async function () {
var doc = document.getElementsByClassName("radio-pjf");
var docle = doc.length;
for (let i = 3; i < docle; i += 5) {
const elemen = doc[i];
elemen.checked = "true";
}
await sleep(4000);
})
btne.addEventListener('click', async function () {
var doc = document.getElementsByClassName("radio-pjf");
var docle = doc.length;
for (let i = 4; i < docle; i += 5) {
const elemen = doc[i];
elemen.checked = "true";
}
await sleep(4000);
})
})();