您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name 高职教师培训视频自动连播 // @namespace http://tampermonkey.net/ // @version 1.0.6 // @description try to take over the world! // @author You // @match http://hbgs.study.gspxonline.com/resource/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { function func(){ var timeOut2=setTimeout(function(){ var playerFather=document.getElementById("aliplayer") var player=document.getElementsByTagName("video")[0] console.log(player) player.play() },1000) var allSection=document.getElementsByClassName("section") var allVideo=[] for(let i=0;i<allSection.length;i++){ console.log(allSection[i]) for(let y=0;y<allSection[i].children[1].childElementCount;y++){ allVideo.push(allSection[i].children[1].children[y]) } } var nowVideo=document.getElementsByClassName("active")[1] var nextVideo=null for(let i=0;i<allVideo.length;i++){ if(nowVideo===allVideo[i]&& i<allVideo.length-2){ nextVideo=allVideo[i+1] } } console.log(nextVideo) var timer2=setTimeout(function(){ var player=document.getElementsByTagName("video")[0] console.log('设置监听') var time4=setInterval(function(){ if(player.currentTime>=player.duration-1){ nextVideo.click() var timer3=setTimeout(function(){ func() },2000) } },5000) /* player.addEventListener('ended',function(e){ }) */ },2000) } var start = setTimeout(function(){ var allTitle=document.getElementsByClassName("title section-name") // 点开每一章 for(let i=0;i<allTitle.length;i++){ if(allTitle[i].childElementCount>=1){ allTitle[i].click() } } var timeOut=setTimeout(function(){ func() },1000) },1000) // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址