Greasy Fork

Greasy Fork is available in English.

南大教务网默认好评

快速完成教务网的教学评价,增加默认选项

当前为 2020-06-12 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         南大教务网默认好评
// @namespace    
// @version      0.1
// @description  快速完成教务网的教学评价,增加默认选项
// @author       LadderOperator
// @include      *://elite.nju.edu.cn/jiaowu/student/evalcourse/courseEval.do?method=currentEvalCourse
// @grant        none
// ==/UserScript==

var getAll
var getMulRadioe
var getQuesRadio
var stateCheck = true

setInterval(fillForm, 100);

function fillForm(e) {
  stateCheck = true
  getAll = document.querySelectorAll("#tbEvalItem form input[type^='radio']")
  getAll.forEach(function(e){
    if (e.checked === true){
      stateCheck = false
    }
  })

  if (stateCheck === true){

    getQuesRadio = document.querySelectorAll("#tbEvalItem form input[name^='ques'][value^='5']")
    getMulRadio = document.querySelectorAll("#tbEvalItem form input[name^='mul'][value^='0']")
    
    getQuesRadio.forEach(function(f){
      f.checked = true
    })
    
    getMulRadio.forEach(function(f){
      f.checked = true
    })

  }



}