Greasy Fork

Greasy Fork is available in English.

whut相关网站优化

1.进入选课系统不用等待30秒。2.可以查看课程对应的推荐班级

目前为 2020-04-21 提交的版本。查看 最新版本

// ==UserScript==
// @name   whut相关网站优化
// @version      0.3.5
// @description  1.进入选课系统不用等待30秒。2.可以查看课程对应的推荐班级
// @namespace TheFirstVoyageOfTheArk
// @author       NoahSuo
// @include http*://218.197.102.183/Course/login.do?msg=*
// @require http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js
// @run-at       document-end
// ==/UserScript==

$(document).ready(function(){
 
(function(){var e = document.getElementById("MyDiv").children[0];
e.outerHTML = `<div style="text-align: right; cursor: default; height: 15px;">
<h1 style="font-size: 20px;" 
onclick="CloseDiv('MyDiv','fade')">关闭</h1></div>`})();

$($("ul.nav").children()[3]).after(`<li onmouseover="this.style.color='yellow';" onmouseout="this.style.color='white';"style="color: white;">排课班级</li>`);
$($("ul.nav").children()[4]).click(
    function(){
        $("div[title='备注']").first().text("排课班级");
        $('tr[target="suid_obj"]').each(
            function(){
                let tr = $(this).contents()
                function commentFilter(){
                    var str = "";
                    tr.filter(function() {
                        if(this.nodeType==8) str = this.data;
                      })
                      return str;
                }
                banji = commentFilter().match(/>(.*)</gs)[0].slice(1,-1);
                $("td",$(this)).eq(-2).text(banji);
            }
        )
    }
)
 
});