// ==UserScript== // @name 四川智慧教育平台教师专题培训-2025.1 // @namespace 代刷vx:shuake345 // @version 0.1 // @description 手动进入播放页面|自动看课程,自动切换课程,自动判断完成。代刷vx:shuake345 // @author 代刷vx:shuake345 // @match *://basic.sc.smartedu.cn/hd* // @grant none // ==/UserScript== (function() { 'use strict'; window.alert = function() { } window.onbeforeunload = null window.confirm = function() { return true } var Zhuyurl = 'teacherTraining' var Chuyurl = 'MyjoinEvent' var Shuyurl = 'CourseWare' var Fhuyurl = '&courseware' 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() { if (document.getElementsByTagName('video').length == 1) { if(document.getElementsByTagName('video')[0].paused){ document.getElementsByTagName('video')[0].play() } var KC =document.querySelectorAll("div > div > p > span")//[1].innerText for (var i = 0; i < KC.length; i++) { if (KC[i].innerText == '100%') { for (var l = 0; l < 5; l++) { if (KC[l].innerText == '继续学习'||KC[l].innerText =='开始学习') { KC[l].click() break; }else if(l==KC.length-1){ console.log('看完了') } } break; } } } } setInterval(Zhuy,9545) function Chuy() { if(parseInt(localStorage.getItem('key'))==NaN){ localStorage.setItem('key',0) } var Lookdpage = parseInt(localStorage.getItem('key')) var zKC = document.querySelectorAll('tbody>tr>td>a') var zKCnum=zKC.length-1//2num kc if(Lookdpage 2) { var zzKC = document.querySelectorAll('tbody>tr>td>span') var zzKCurl = document.querySelectorAll('tbody>tr>td>a') for (var i = 0; i < zzKC.length; i++) { if (zzKC[i].innerText == '未学完' || zzKC[i].innerText == '未开始') { localStorage.setItem('Surl', window.location.href) window.location.replace(zzKCurl[i].href) break; } else if (i == zzKC.length - 1) { setTimeout(gbclose, 1104) } } } } //setInterval(Shuy, 3124) function Fhuy() { if (document.getElementsByTagName('video').length == 1) { document.getElementsByTagName('video')[0].volume = 0 document.getElementsByTagName('video')[0].play() } if (document.querySelector('iframe').contentWindow.document.querySelector('span.qplayer-currtime').innerText == document.querySelector('iframe').contentWindow.document.querySelector('span.qplayer-totaltime').innerText) { window.location.replace(localStorage.getItem('Surl')) } } function QT(){ var d1=document.getElementsByClassName('name')[0]; var img=document.createElement("img"); img.style="width:230px; height:230px;" img.src="https://img.nuannian.com/files/images/23/1019/1697723881-6511.png";//xuanchuan d1.appendChild(img); } setTimeout(QT,2000) })();