您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript== // @name 智慧树刷课程 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match *://online.zhihuishu.com/CreateCourse/learning/videoList?courseId* // @grant none // ==/UserScript== window.onload = function() { //视频播放暂停 document.getElementById("vjs_mediaplayer_html5_api").onpause = function() { console.log('已暂停'); for(var i = 0; i < 5; i++) { if(document.getElementById('popbox_title')) { var x = document.getElementsByClassName('popbtn_cancel'); x[0].click(); } } }; //视频播放结束 document.getElementById("vjs_mediaplayer_html5_api").onended=function(){ console.log('已结束'); var videolist=document.getElementsByClassName('clearfix video lesson'); for (var i=0;i<videolist.length;i++) { var videostate=videolist[i].getAttribute('watchstate'); if (videostate=='2'){ console.log('继续观看'); videolist[i].click(); document.getElementById("vjs_mediaplayer_html5_api").play(); break; } else if(videostate=='0'){ console.log('下一节观看'); videolist[i].click(); document.getElementById("vjs_mediaplayer_html5_api").play(); break; } } }; };