评教

qd

  1. // ==UserScript==
  2. // @name 评教
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description qd
  6. // @author droit
  7. // @match https://172-20-139-153-7700.webvpn.qqhru.edu.cn/student/teachingEvaluation/teachingEvaluation/evaluationPage
  8. // @match http://111.43.36.164/student/teachingEvaluation/teachingEvaluation/evaluationPage
  9. // @match http://172.20.139.153:7700/student/teachingEvaluation/teachingEvaluation/evaluationPage
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. var keyWord = ["(A)"];
  16. $(".ace").each(function(){
  17. var self = $(this);
  18. var text = $(this).next().next().html();
  19. keyWord.forEach(function(value){
  20. if(text.includes(value)) {
  21. self.click();
  22. }
  23. });
  24. console.log(text);
  25. });
  26. var content = "上课有热情,积极解决学生问题。"; // 自行修改填写
  27. $("#page-content-template > div > div > div.widget-content > form > div > table > tbody > tr:nth-child(25) > td > div > textarea").val(content);
  28.  
  29. setTimeout(function() {
  30. $("#buttonSubmit").click();
  31. setTimeout(function() {
  32. $("#layui-layer1 > div.layui-layer-btn > a.layui-layer-btn0").click();
  33. console.log("我提交啦");
  34. }, 1370);
  35. }, 137001);
  36. function checkTimerEnd() {
  37. var minutes = parseInt(document.getElementById("RemainM").innerHTML);
  38. var seconds = parseInt(document.getElementById("RemainS").innerHTML);
  39.  
  40. if (minutes === 0 && seconds === 0) {
  41. document.getElementById("RemainS").innerHTML = "0";
  42. flag = true;
  43. document.getElementById("js").remove();
  44. console.log("倒计时结束");
  45. $("#buttonSubmit").click();
  46. }
  47. }
  48.  
  49. setInterval(checkTimerEnd, 1000);
  50.  
  51. })();