// ==UserScript== // @name 山东省教师教育平台-qlteacher // @namespace vx:shuake345 // @version 0.1 // @description 自动看课,带刷网课+++++vx:shuake345 // @author vx:shuake345 // @match *://v3.dconline.net.cn/* // @match *://*.qlteacher.com/ // @match *://*.lt-edu.net/* // @match *://*.dccloud.com.cn/* // @icon https://www.google.com/s2/favicons?sz=64&domain=lt-edu.net // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Your code here... document.addEventListener("visibilitychange", function() { console.log(document.visibilityState); if(document.visibilityState == "hidden") { } else if (document.visibilityState == "visible") {if(document.URL.search('project_id')>1 ){setTimeout(function (){window.location.reload()},1000)}}}); function zy(){ if(document.URL.search('project_id')>1){ if(document.getElementsByClassName('el-dialog__close el-icon el-icon-close').length>0){ document.getElementsByClassName('el-dialog__close el-icon el-icon-close')[1].click() var jxxx=document.querySelectorAll("ul > li > div.project-courseBottom > div.project-courseInfo > span") var jxxx1=document.getElementsByClassName('project-course')[1].querySelectorAll('li>div.project-courseBottom>div>span.project-courseButton') for (var i=0;i0){ var wendang=document.getElementsByClassName('fs12 c-red') for (var l=0;l0){ wendang[l].nextElementSibling.click() } } } if(document.URL.search('dccloud.com')>1){ window.close() } } setInterval(sy,1000) function sx(){ if(document.URL.search('course_id=')>1){ if( document.getElementsByClassName('mr20').length>1){ if(parseInt(document.getElementsByClassName('mr20')[1].innerText.split(':')[1].split('/')[0])==parseInt(document.getElementsByClassName('mr20')[1].innerText.split(':')[1].split('/')[1])){ window.location.reload() } } setTimeout(function (){window.location.reload()},600000) } } setInterval(sx,20000) function cy(){ if(document.URL.search('course_id=')>1){ document.getElementsByTagName('video')[0].play() var menu=document.getElementsByClassName('nav_menu') for (var i=0;i0){ if(document.getElementsByClassName('el-icon-video-play el-icon el-icon-video-pause')[0].nextElementSibling.innerText=="已学习"){ if( document.getElementsByClassName('video-status unstudy').length>0){ document.getElementsByClassName('video-status unstudy')[0].click() }else if(document.getElementsByClassName('video-status study').length>0){ document.getElementsByClassName('video-status study')[0].click() } } } if(document.getElementsByClassName('el-button el-button--default el-button--small el-button--primary ').length==1){//确定切换 if(document.getElementsByClassName('el-button el-button--default el-button--small el-button--primary ').length>0){ document.getElementsByClassName('el-button el-button--default el-button--small el-button--primary ')[0].click() } } /*if(document.getElementsByClassName('mr20')[1].innerText.split('/')[0].split(':')[1]==document.getElementsByClassName('mr20')[1].innerText.split('/')[1]){//0/1变1/1的时候。刷新一下 window.location.reload() }*/ if(document.getElementsByClassName('fs12 c-red').length>0){//文档是否看了 var wendang=document.getElementsByClassName('fs12 c-red') for (var l=0;i0){ wendang[l].nextElementSibling.click() } } } } } setInterval(cy,5000) })();