福建中医药大学教务系统修复

将被chromium、firefox弃用的showModalDialog替换为open实现非IE浏览器查看学生项目成绩、教评操作等操作

  1. // ==UserScript==
  2. // @name 福建中医药大学教务系统修复
  3. // @version 1.3
  4. // @namespace sglzp
  5. // @description 将被chromium、firefox弃用的showModalDialog替换为open实现非IE浏览器查看学生项目成绩、教评操作等操作
  6. // @author sglzp
  7. // @match http://210.34.74.244/fjzyyjsxsd/*
  8. // @match https://125.77.120.77:4433/web/*/http/*/210.34.74.244/fjzyyjsxsd/*
  9. // @match https://125.77.120.67:4433/http/77726476706e69737468656265737421a2a611d2746426072a46dbf8cc/fjzyyjsxsd/*
  10. // @match https://jwxt.webvpn.fjtcm.edu.cn:4433/fjzyyjsxsd/*
  11. // @run-at document_start
  12. // @grant unsafeWindow
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. (function() {
  17.  
  18. function JsMod(htmlurl,tmpWidth,tmpHeight){
  19. htmlurl=unsafeWindow.getRandomUrl(htmlurl);
  20. var newwin;
  21.  
  22. if(window.location.host.indexOf("125.77.120.77")==0) {
  23. newwin = unsafeWindow.SF_FUNC_CALLFUNC(window,0,this,htmlurl,window,"width="+tmpWidth+",status=no,height="+tmpHeight);// 通过webvpn访问
  24.  
  25. if(newwin == "refresh" || newwin == "ok"){
  26. if(unsafeWindow.getOs() == "chrome"){
  27. unsafeWindow.SF_FUNC_GETATT(window,4).reload();
  28. }else{
  29. unsafeWindow.SF_FUNC_SETATT(unsafeWindow.SF_FUNC_GETATT(window,4),7, unsafeWindow.SF_FUNC_GETATT(unsafeWindow.SF_FUNC_GETATT(window,4),+7));
  30. }
  31. }
  32. } else {
  33. if(window.location.host.indexOf("125.77.120.67")==0){
  34. htmlurl = "/http/77726476706e69737468656265737421a2a611d2746426072a46dbf8cc" + htmlurl;
  35. }
  36. newwin = window.open(htmlurl,window,"width=" + tmpWidth + ",status=no,width=" + tmpWidth);
  37. if(newwin == "refresh" || newwin == "ok"){
  38. if(unsafeWindow.getOs() == "chrome"){
  39. window.location.reload();// 谷歌浏览器要用此方法刷新
  40. }else{
  41. window.location.href = window.location.href;
  42. }
  43. }
  44. }
  45. }
  46.  
  47. function JsModAll(htmlurl,tmpWidth,tmpHeight,formName){
  48. htmlurl=unsafeWindow.getRandomUrl(htmlurl);
  49. var newwin;
  50.  
  51. if(window.location.host.indexOf("125.77.120.77")==0) {
  52. newwin = unsafeWindow.SF_FUNC_CALLFUNC(window,0,this,htmlurl,window,"width="+tmpWidth+",status=no,height="+tmpHeight);
  53. if(formName == null || formName == undefined || formName == ""){
  54. unsafeWindow.SF_FUNC_CALLFUNC(document,68,this,"Form1").submit();
  55. }else{
  56. unsafeWindow.SF_FUNC_CALLFUNC(document,68,this,formName).submit();
  57. }
  58. } else {
  59. if(window.location.host.indexOf("125.77.120.67")==0){
  60. htmlurl = "/http/77726476706e69737468656265737421a2a611d2746426072a46dbf8cc" + htmlurl;
  61. }
  62. newwin = window.open(htmlurl,window,"width=" + tmpWidth + ",status=no,width=" + tmpWidth);
  63. if(formName == null || formName == undefined || formName == ""){
  64. document.getElementById("Form1").submit();
  65. }else{
  66. document.getElementById(formName).submit();
  67. }
  68. }
  69. }
  70.  
  71. function JsModForm(htmlurl,tmpWidth,tmpHeight,formName){
  72. htmlurl=unsafeWindow.getRandomUrl(htmlurl);
  73. var newwin;
  74.  
  75. if(window.location.host.indexOf("125.77.120.77")==0) {
  76. newwin = unsafeWindow.SF_FUNC_CALLFUNC(window,0,this,htmlurl,window,"width="+tmpWidth+",status=no,height="+tmpHeight);
  77. if(newwin == "refresh" || newwin == "ok"){
  78. if(formName == null || formName == undefined || formName == ""){
  79. unsafeWindow.SF_FUNC_CALLFUNC(document,68,this,"Form1").submit();
  80. }else{
  81. unsafeWindow.SF_FUNC_CALLFUNC(document,68,this,formName).submit();
  82. }
  83. }
  84. } else {
  85. if(window.location.host.indexOf("125.77.120.67")==0){
  86. htmlurl = "/http/77726476706e69737468656265737421a2a611d2746426072a46dbf8cc" + htmlurl;
  87. }
  88. newwin = window.open(htmlurl,window,"width=" + tmpWidth + ",status=no,width=" + tmpWidth);
  89. if(newwin == "refresh" || newwin == "ok"){
  90. if(formName == null || formName == undefined || formName == ""){
  91. document.getElementById("Form1").submit();
  92. }else{
  93. document.getElementById(formName).submit();
  94. }
  95. }
  96. }
  97. }
  98.  
  99. unsafeWindow.JsMod = JsMod
  100. unsafeWindow.JsModAll = JsModAll
  101. unsafeWindow.JsModForm = JsModForm
  102.  
  103. })();

QingJ © 2025

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