Greasy Fork is available in English.
这是一个定制化自动脚本
当前为
// ==UserScript==
// @name 自动播放
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 这是一个定制化自动脚本
// @author Mr.Yang
// @license MIT
// @match http://cqlg.360xkw.com/gxplatform/gxlearningcenter/learning.html?subCourseId=65655&courseid=17
// @icon https://www.google.com/s2/favicons?sz=64&domain=360xkw.com
// @require https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js
// ==/UserScript==
(function() {
'use strict';
var n = 0;
var li = document.getElementsByClassName("isVideo");
$(()=>{
alert("Mr.Yang提示您:点击确定,然后选择要观看的视频即可。PS:推荐你选择每个课程第一条视频,我会自动为您检索未播放完的视频。请您耐心等待!");
})
setInterval(function(){
//$(()=>{
// console.log("Mr.Yang提示您:正在播放第",n+1,"个视频。")
// })
$(()=>{
for(let i=0;i < li.length;i++){
li[i].onclick = function(){
n = i;
}
}
})
},5000)
setTimeout(function () {
var elevideo = document.getElementById("live_video");
elevideo.addEventListener('play',function(){
console.log("yjc:开始播放");
})
elevideo.addEventListener('playing',function(){
console.log("yjc:正在播放");
})
elevideo.addEventListener('pause',function(){
console.log("yjc:暂停播放");
})
elevideo.addEventListener('ended',function(){
console.log("yjc:结束播放");
n++;
document.getElementsByClassName("isVideo")[n].click();
})
}, 5000)
})();