// ==UserScript== // @name 教务系统中自动评价 // @namespace http://your-namespace.com // @version 1.0 // @description 教务系统中自动给分 // @match http://epo.cug.edu.cn/Gstudent/* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Function to select the "很好" option function selectRatingOption() { var dropdowns = document.querySelectorAll('select[id^="ctl00_contentParent_dgData"]'); for (var i = 0; i < dropdowns.length; i++) { var dropdown = dropdowns[i]; dropdown.value = "90"; // Select the "很好" option (value="90") } } // Wait for the table to load, then select the rating option var observer = new MutationObserver(function(mutations) { var table = document.getElementById('ctl00_contentParent_dgData'); if (table) { selectRatingOption(); observer.disconnect(); } }); observer.observe(document, { childList: true, subtree: true }); })();