FDU CourseEvaluator

非常无脑的评教脚本

目前為 2024-03-20 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         FDU CourseEvaluator
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  非常无脑的评教脚本
// @author       char不多得了
// @match        http://ce.fudan.edu.cn/q.aspx*
// @match        https://ce.fudan.edu.cn/q.aspx*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=fudan.edu.cn
// @grant        GM_registerMenuCommand
// @grant        GM.registerMenuCommand
// @require      https://code.jquery.com/jquery-3.6.1.slim.min.js
// @license      MIT License
// ==/UserScript==

(function() {
    'use strict';

    // 适配不同版本的GM函数
    var _GM_registerMenuCommand;
    if(typeof GM_registerMenuCommand!='undefined'){
        _GM_registerMenuCommand=GM_registerMenuCommand;
    }else if(typeof GM!='undefined' && typeof GM.registerMenuCommand!='undefined'){
        _GM_registerMenuCommand=GM.registerMenuCommand;
    }
    if(typeof _GM_registerMenuCommand=='undefined')_GM_registerMenuCommand=(s,f)=>{};

    function fill(){
        let q_list = $("#subject_box").children()
        // let subject_box = $("dl")
        console.log(q_list)
        console.log($(".open_input"))
        for(let q in q_list){
            // console.log(q_list[q])
            try{
            let opt0 = q_list[q].children[1].children[0].children[0]
            // console.log(opt0)
            opt0.click()
            // console.log(q)
            }
            catch(err){}
        }
        $("#next_button").click()
        setTimeout(()=>{
            $("button.ui-dialog-autofocus").click()
        },50)
    }
    _GM_registerMenuCommand("填",fill);
})();