// ==UserScript== // @name 临沂专技继续教育 // @namespace zidong // @version 0.1 // @description vx:shuake345 // @author vx:shuake345 // @match https://sdly-train.treewises.com/learning/* // @match *://sdly-train.treewises.com/* // @grant none // ==/UserScript== (function() { 'use strict'; window.alert = function() { } window.onbeforeunload = null window.confirm = function() { return true } var Zhuyurl = 'my/index' var Chuyurl = 'learning/index' document.addEventListener("visibilitychange", function() { console.log(document.visibilityState); if (document.visibilityState == "hidden") { //yincang } else if (document.visibilityState == "visible") { if (document.URL.search(Zhuyurl) > 1) { setTimeout(sxrefere, 1000) } } }); function fhback() { window.history.go(-1) } function gbclose() { window.close() } function sxrefere() { window.location.reload() } function Zhuy() { document.querySelectorAll(" div > p.year")[1].click() //var KC = document.querySelectorAll("span.ant-progress-text")[0].click()//点击没完成的 /*var KCjd = document.querySelectorAll('.item>ul>li>i') //[0].innerText for (var i = 0; i < KCjd.length; i++) { if (KCjd[i].innerText == '[未完成]') { window.open(KC[i].href) break; } }*/ } function Chuy() { window.location.replace('https://sdly-train.treewises.com/my/index') } function Pd() { if (document.URL.search(Chuyurl) > 2) { setInterval(Chuy, 600200) } else if (document.URL.search(Zhuyurl) > 2) { setTimeout(Zhuy, 24) } } setTimeout(Pd, 4254) })();