Greasy Fork

Greasy Fork is available in English.

智慧树刷课程

try to take over the world!

当前为 2017-04-13 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         智慧树刷课程
// @namespace    http://tampermonkey.net/
// @version      0.5
// @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=='0'){
-								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;
-							}				
					
						}
					
					
					
					
					
						
					};
					
					
				};