三亚学院新教务评教

借鉴了南昌航空大学教务处一键评教,使用方法:打开评教页面会自动选中评分,用户手动点击提交即可

  1. // ==UserScript==
  2. // @name 三亚学院新教务评教
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @author 初七
  6. // @description 借鉴了南昌航空大学教务处一键评教,使用方法:打开评教页面会自动选中评分,用户手动点击提交即可
  7. // @include http://jwxt.sanyau.edu.cn/syxy_jsxsd/xspj/xspj_list.do*
  8. // @include http://jwxt.sanyau.edu.cn/syxy_jsxsd/xspj/xspj_edit_syxy.do*
  9. // @grant unsafeWindow
  10. // @grant window
  11. // @reqire http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js
  12.  
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. var markPosition=1
  17. var flag1=0;
  18. var href=document.location.href;
  19. if(href.search('jwxt.sanyau.edu.cn/syxy_jsxsd/xspj/xspj_list.do')!=-1){//判断是否为加载网页
  20. hook();
  21. addBtn()
  22. }else {
  23. remark();
  24. }
  25. function hook() {
  26. unsafeWindow.JsMod = function (htmlurl, tmpWidth, tmpHeight) {
  27. htmlurl = getRandomUrl(htmlurl);
  28. var newwin = window.open(htmlurl, window, "dialogWidth:" + tmpWidth + "px;status:no;dialogHeight:" + tmpHeight + "px")
  29. if (newwin == "refresh" || newwin == "ok") {
  30. if (getOs() == "chrome") {
  31. alert(getOs());
  32. window.location.reload();// 谷歌浏览器要用此方法刷新
  33. } else {
  34. window.location.reload()
  35. //window.location.href = window.location.href;
  36. }
  37. }
  38.  
  39. }
  40. }
  41. function remark() {
  42. //hookRemark();
  43. //hookAlert()
  44. //执行评分
  45. var length=$("input[type='radio']").length;
  46. $("input[type='radio']").each(function (index) {
  47. //if(length-1-index<4){
  48. var position=3;
  49. if((length-1)-index==position){
  50. $(this).attr('checked','checked')
  51. }
  52. /*}else*/ if(index%5==0){
  53. $(this).attr('checked','checked')
  54. }
  55. })
  56. $('textarea').val('老师的课很好听');
  57. }
  58. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址