您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Tsinghua Course Time Confliction Marker
当前为
// ==UserScript== // @name TsinghuaCourseConflictMarker // @namespace https://github.com/ZenithalHourlyRate // @homepageURL https://github.com/ZenithalHourlyRate/thuservices // @version 1.2 // @description Tsinghua Course Time Confliction Marker // @author Zenithal // @match http://zhjwxk.cic.tsinghua.edu.cn/xkBks.vxkBksXkbBs.do?m=selectKc* // @match http://zhjwxkyw.cic.tsinghua.edu.cn/xkBks.vxkBksXkbBs.do?m=selectKc* // @match https://webvpn.tsinghua.edu.cn/http/*/xkBks.vxkBksXkbBs.do?m=selectKc* // @grant none // ==/UserScript== function courseConflict(){ var a=document.getElementById('iframe2').contentWindow.document.getElementsByClassName("trunk");// get the iframe of selected courses var b=[]; for(var i=0;i!=a.length;++i){ if(a[i].text.match(/.-.(.*)/gi)){ // get the span with time information if(a[i].title == ""){ // some text is abbrevated var c1=a[i].text.split(","); // some has multiple time for(var j1=0;j1!=c1.length;++j1){ b.push(c1[j1]); } }else{ var c2=a[i].title.split(","); // some has multiple time for(var j2=0;j2!=c2.length;++j2){ b.push(c2[j2]); } } } } var d=document.getElementById('iframe1').contentWindow.document.getElementsByClassName("trunk"); for(i=0;i!=d.length;++i){ if(d[i].text.match(/.-.(.*)/gi)){ var e="" if(d[i].title == ""){ e=d[i].text; } else { e=d[i].title; } var f=e.split(','); for(var j=0;j!=f.length;++j){ for(var k=0;k!=b.length;++k){ if(f[j][0]==b[k][0] && f[j][2]==b[k][2]){ // just comparison on time, no comparison on others d[i].style.color="#ff0000" } } } } } } (function() { document.getElementById('iframe1').onload=courseConflict; document.getElementById('iframe2').onload=courseConflict; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址