自动评教

自动评教解放双手

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         自动评教
// @namespace    https://tampermonkey.net/
// @version      1.01
// @description  自动评教解放双手
// @author       ?
// @match        *://jwxt.gcu.edu.cn/*
// @grant        none
// @homepage     https://greasyfork.org/zh-CN/scripts/418924-%E5%8E%BB%E6%AD%BB%E5%90%A7-%E8%AF%84%E6%95%99gcu
// @run-at document-start
// ==/UserScript==
document.addEventListener ("DOMContentLoaded", jq); // 渲染完成载入jq
window.addEventListener ("load", load_end); // 全部加载完成后执行
window.alert=() => {}; // 去除弹窗

function jq(){
    var importJs=document.createElement('script')
    importJs.setAttribute("type","text/javascript")
    importJs.setAttribute("src", 'https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js')
    document.getElementsByTagName("head")[0].appendChild(importJs)
}

function load_end () {
    let success = 0;
    if($('#DataGrid1__ctl12_JS1').length > 0){
        $('#DataGrid1__ctl2_JS1').val('4(良好)');
        for (let index = 1; index < 20; index++) {
            let temp_id = 'DataGrid1__ctl' + (index + 2) + '_JS1';
                 $("#" + temp_id).val('5(优秀)');

        }
        if($('#Button2').attr('disabled') == undefined){
            $('#Button2').click();
        } else{
            $('#Button1').click();
        }
    }
};