学习贯彻党的二十大精神网络专题培训(一)2022年第四期(幼儿园)
// ==UserScript==
// @name 学习贯彻党的二十大精神网络专题培训(一)2022年第四期(幼儿园)
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://jspx.dgjy.net/*
// @match https://jspx.dgjy.net/train/trainee/courseware.action?
// @icon https://www.google.com/s2/favicons?sz=64&domain=dgjy.net
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
// 完成点击确定
function complete(){
document.getElementsByClassName('popUp-layer popUp-layer-tips')[1].getElementsByClassName('abtn-blue submit')[0].click();
};
setInterval(complete(),6000);
// https://jspx.dgjy.net/train/trainee/courseStudyMain.action?planId=8A18E0D184A4536D0184BCFBA3CA2D63
function study_main() {
if (document.URL.search("courseStudyMain.action") > 1) {
// var menu = document.getElementsByClassName('tier-tree mt-15')[0].getElementsByClassName('tier-tree-two tier-tree-inner')
var menu = document.getElementsByClassName('tier-tree mt-15')[0].getElementsByClassName('tier3')
for (var i = 13; i < 24; i++) {
var tt = menu[i].getElementsByClassName('info')[0].innerHTML
if (tt.search('未完成') != -1) {
menu[i].getElementsByClassName('name')[0].querySelector('a').click();
break;
} else {
continue;
}
}
}
};
setInterval(study_main,4000);
function bofang() {
var btn= document.querySelector('div[data-title=点击播放]')
btn.click();
};
setInterval(bofang,3000);
})();