浏览器打开智慧树要播放的视屏,按F12,点击console,将下面的代码粘贴过去按回车键,播放窗口会出现红色播放按钮,点击一次即可。然后视频便会自动播放,播放完当前视频会自动播放下一个视频。
function timeCount()
{
if(document.getElementById('popbox_title')) {
var x = document.getElementsByClassName('popbtn_cancel');
window.clearInterval();
x[0].click();
console.log('关闭窗口');
}
}
var time=0;
var father=document.getElementById("my");
var divs = document.createElement("div");
divs.id='mybutton';
divs.style.position='fixed';
divs.style.left='150px';
divs.style.top='100px';
divs.style.width='72px';
divs.style.height='72px';
divs.style.backgroundImage="url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACPVBMVEUAAAAAAAD0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0QzYAAAD0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0QzYAAAD0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Qzb0Rzr0SDv0QTT0Qzb0Qzb0QjX1Wk76qaP2Y1j0QjX0Qzb0Qzb0QTT1XFH+7Ov95OL3fnX0RTj0QjX0Qzb0Qzb0QTT1XFH+6un////+8/P6pqD1TkL0QTT0Qzb0Qzb1XFH+6un//////////Pz8ysb2Zlz0QTT0QjX0Qzb+6un////////////////94+H4jYX0SDz0QTT0Qzb0Qzb/////////////////+vn6rqj1Wk70QDP0Qzb0Qzb////////////80s/3cWf0Qzb0QjX0Qzb0Qzb////////////+7+75k4v0Sz/0QjT0Qzb0Qzb/////////////+/v7wLv2XVL0QTT0Qzb0Qzb////////////93dv3fnX0QjX0QjX0Qzb0Qzb////////////+7+36opv1U0j0QTT0Qzb0Qzb////////////8ysb2aF70Qzb0QjX0Qzb////////////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TYgeDg2XzY0IDIwMTYtMDktMTcgaHR0cDovL3d3dy5pbWFnZW1hZ2ljay5vcmfd2aVOAAAAY3RFWHRzdmc6Y29tbWVudAAgR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICC7tNZnAAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OkhlaWdodAAzMDELEk/IAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADMwMZjjH5UAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTQ0MTExOTAxNnWIc0AAAAASdEVYdFRodW1iOjpTaXplADQuMTZLQjPE0YMAAABfdEVYdFRodW1iOjpVUkkAZmlsZTovLy9ob21lL3d3d3Jvb3Qvc2l0ZS93d3cuZWFzeWljb24ubmV0L2Nkbi1pbWcuZWFzeWljb24uY24vc3JjLzExOTIzLzExOTIzNTIucG5nFV3lRQAAAABJRU5ErkJggg==')";
divs.onclick=function(){
setTimeout(function(){
console.log('切换到1.5倍');
document.getElementsByClassName('speedTab15')[0].click();
},5000);
if(time===0){
alert('已经启动,可以最小化了');
}else{
console.log('第二次初始化');
}
//视频播放暂停
document.getElementById("vjs_mediaplayer_html5_api").onpause = function() {
console.log('已暂停');
window.setInterval(timeCount(),700);
};
//视频播放结束
document.getElementById("vjs_mediaplayer_html5_api").onended=function(){
console.log('已结束');
setTimeout(function(){
document.getElementById('nextBtn').click();
setTimeout(function(){
time=1;
divs.click();
},5000);
},2500);
};
};
document.body.appendChild(divs);