FDU CourseEvaluator

非常无脑的评教脚本

  1. // ==UserScript==
  2. // @name FDU CourseEvaluator
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description 非常无脑的评教脚本
  6. // @author char不多得了
  7. // @match http://ce.fudan.edu.cn/q.aspx*
  8. // @match https://ce.fudan.edu.cn/q.aspx*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=fudan.edu.cn
  10. // @grant GM_registerMenuCommand
  11. // @grant GM.registerMenuCommand
  12. // @require https://code.jquery.com/jquery-3.6.1.slim.min.js
  13. // @license MIT License
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18.  
  19. // 适配不同版本的GM函数
  20. var _GM_registerMenuCommand;
  21. if(typeof GM_registerMenuCommand!='undefined'){
  22. _GM_registerMenuCommand=GM_registerMenuCommand;
  23. }else if(typeof GM!='undefined' && typeof GM.registerMenuCommand!='undefined'){
  24. _GM_registerMenuCommand=GM.registerMenuCommand;
  25. }
  26. if(typeof _GM_registerMenuCommand=='undefined')_GM_registerMenuCommand=(s,f)=>{};
  27.  
  28. function fill(){
  29. let q_list = $("#subject_box").children()
  30. // let subject_box = $("dl")
  31. console.log(q_list)
  32. console.log($(".open_input"))
  33. for(let q in q_list){
  34. // console.log(q_list[q])
  35. try{
  36. let opt0 = q_list[q].children[1].children[0].children[0]
  37. // console.log(opt0)
  38. opt0.click()
  39. // console.log(q)
  40. }
  41. catch(err){}
  42. }
  43. $("#next_button").click()
  44. setTimeout(()=>{
  45. $("button.ui-dialog-autofocus").click()
  46. },50)
  47. }
  48. _GM_registerMenuCommand("填",fill);
  49. })();