// ==UserScript== // @name 福理工教学评价 // @namespace https://docs.scriptcat.org/ // @version 0.1.3 // @description try to take over the world! // @author yearzen1 // @match https://zhpj-443.webvpn.fjut.edu.cn/mobDdXkAction* // @run-at document-idle // @grant none // ==/UserScript== (function() { 'use strict'; if(!sessionStorage.getItem("start")) { if(!confirm("是否开始脚本")) return sessionStorage.setItem("start","1") const value = prompt("请输入你想给每位老师的评分") sessionStorage.setItem("value",value) } if(sessionStorage.getItem("last")) { sessionStorage.removeItem("last") const 跳转 = document.querySelector("#segmentedControl > a:nth-child(1)") if(跳转) window.location.href = 跳转.getAttribute("href") } const 待评价课程 = document.querySelectorAll("body > div.mui-content > ul > li > div > div.mui-button-row > button") for(let 单一课程 of 待评价课程) 单一课程.click() const 数字评分 = document.querySelectorAll(".mui-input-clear") for(let 单一数字评分 of 数字评分) 单一数字评分.value = Number(sessionStorage.getItem("value")) const 单选题 = document.querySelector("#form1 > div:nth-child(22) > div > div:nth-child(1) > input[type=radio]") 单选题.click() const 提交按钮 = document.querySelector("#submit1") if(提交按钮) { 提交按钮.click() sessionStorage.setItem("last",window.location.href) } // Your code here... })();