|
发表于
2024-7-31 11:05:03
|
显示全部楼层
// ==UserScript==
// @name 贵州医科大
// @namespace http://tampermonkey.net/
// @version 2024-07-30
// @description try to take over the world!
// @author You
// @match https://xnfzsys.gmc.edu.cn/mengoo/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @grant unsafeWindow
// @run-at document-start
// ==/UserScript==
let aa =setInterval(function(){
// 获取到全部章节目录
let nodeList = document.querySelectorAll(".resCourse")
if(nodeList.length!=0){
clearInterval(aa)
console.log(nodeList);
for(let x =0;x<nodeList.length;x++){
// 获取每个章节的进度条是否完成
var ChapterProgress = nodeList[x].lastChild.innerText.replace("%",'');
// 获取每个章节的标题
var ChapterText = nodeList[x].childNodes[0].childNodes[1].innerText;
if(ChapterProgress==100){
console.log("已完成:"+ChapterText+"进度条为"+ChapterProgress);
}else{
console.log("未完成:"+ChapterText+"进度条为"+ChapterProgress);
}
}
}
},1000) |
|