// ==UserScript== // @name 辽宁省干部在线学习网-专业技术专区专用 // @namespace 代刷课程 // @version 1.04 // @description 加微信发测试视频,全部专区均可刷课时 // @author 代刷vx:GKmkj123 // @match *://zyjs.lngbzx.gov.cn/* // @icon https://www.google.com/s2/favicons?sz=64&domain=lngbzx.gov.cn // @grant none // ==/UserScript== (function() { 'use strict'; document.addEventListener("visibilitychange", function() { console.log(document.visibilityState); if(document.visibilityState == "hidden") { } else if (document.visibilityState == "visible") { if(document.URL.search('yearplan/gostudy')>1){setTimeout(sx,1000)} } }); function sx(){window.location.reload()} function zy(){ if(document.URL.search('yearplan/gostudy')>1){ var xxnum= document.querySelectorAll('dl.w_zxinfo.fl>dd.time>span.fr') for (var i=0;idd.teach>p')[i].click() break; }else if(i==xxnum.length-1){ var yeshu=document.querySelectorAll('ul.pagination>li').length-2 var nowyeshu=Number( document.querySelector('ul.pagination>li>span.on').innerText) if(yeshu==nowyeshu){ window.close() }else { document.querySelector('ul.pagination>li>span.on').parentNode.nextElementSibling.getElementsByTagName('a')[0].click() } } } } } setTimeout(zy,3000) function cy(){ if(document.URL.search('resource/info')>1){ if(document.getElementsByTagName('button')[0].innerText=="点击观看"){ document.getElementsByTagName('button')[0].click() } } } setTimeout(cy,2000) function bfy(){ if(document.URL.search('study/xml')>1){window.close(),600000} } setTimeout(bfy,1000) })();