UCAS SEP教评系统自动填写

自动填写SEP教评系统。

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         UCAS SEP教评系统自动填写
// @namespace    Yuankong11
// @version      0.1
// @description  自动填写SEP教评系统。
// @author       Yuankong11
// @include      http://jwxk.ucas.ac.cn/evaluate/evaluateTeacher/*
// @include      http://jwxk.ucas.ac.cn/evaluate/evaluateCourse/*
// ==/UserScript==

(function() {
    'use strict';
    let l = document.querySelectorAll('[name^="item_"][value="5"]');
    for(let i = 0; i < l.length; i++) {
        l[i].checked = true;
    }
    let t = document.querySelectorAll('textarea[name^="item_"]');
    for(let i = 0; i < t.length; i++) {
        let text = window.location.href.indexOf('evaluateTeacher') + 1 ?
              "治学严谨、备课充分、讲课认真、因材施教" : "课程与作业(包括作业、报告、测验测试、论文等)有助于我的能力的提高";
        t[i].innerText = text;
    }
    if (window.location.href.indexOf('evaluateCourse') + 1) {
        document.querySelectorAll('input[name^="radio_"]')[0].checked = true;
        document.querySelectorAll('input[name^="item_"][type="checkbox"]')[0].checked = true;
    }
})();