// ==UserScript== // @name 桑梓小学配餐满意度自动填写 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 济南市天桥区桑梓小学配餐满意度自动填写 // @author 脚本助手 // @match https://v.wjx.cn/vm/w7Hn0J5.aspx* // @grant none // ==/UserScript== (function() { 'use strict'; window.addEventListener('load', function() { setTimeout(() => { // 身份:只选学生/家长 const identity = document.querySelectorAll('div[role="radio"][aria-label="A.学生"], div[role="radio"][aria-label="C.家长"]'); if (identity.length) identity[Math.floor(Math.random()*identity.length)].click(); // 年级随机 const grades = document.querySelectorAll('div[role="radio"][aria-label^="A.一年级"],div[role="radio"][aria-label^="B.二年级"],div[role="radio"][aria-label^="C.三年级"],div[role="radio"][aria-label^="D.四年级"],div[role="radio"][aria-label^="E.五年级"],div[role="radio"][aria-label^="F.六年级"]'); if (grades.length) grades[Math.floor(Math.random()*grades.length)].click(); // 班级随机 const classes = document.querySelectorAll('div[role="radio"][aria-label^="A.一班"],div[role="radio"][aria-label^="B.二班"],div[role="radio"][aria-label^="C.三班"],div[role="radio"][aria-label^="D.四班"],div[role="radio"][aria-label^="E.五班"],div[role="radio"][aria-label^="F.六班"]'); if (classes.length) classes[Math.floor(Math.random()*classes.length)].click(); // 所有题全选【满意】 document.querySelectorAll('div[role="radio"][aria-label="A.满意"]').forEach(i => i.click()); console.log("✅ 已自动填写完成"); }, 800); }); })();