智慧树Plugin

自动连播 自动静音1.5倍速

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         智慧树Plugin
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  自动连播 自动静音1.5倍速
// @author       You
// @match        https://hike.zhihuishu.com/aidedteaching/sourceLearning/*
// @grant        none
// ==/UserScript==

(function() {
var regx = /(?<=fileId=)\d+/;
var url = window.location.href
var id = parseInt(url.match(regx));

var cirl = function() {
	var eleId = 'file_'+id;
	var ele = document.getElementById(eleId);
	//console.log(id);
	if (ele.innerHTML.indexOf('icon-finish')!=-1) {
		var index = id+1;
		var baseUrl = url.replace(regx,index);
		window.location.href=baseUrl;
	}

};
setInterval(cirl,500);
setTimeout(function(){
document.getElementById("playButton").click();
document.getElementsByClassName("speedTab15")[0].click();
//document.getElementsByClassName("line1bq")[0].click();
document.getElementsByClassName("volumeIcon")[0].click();
},2000)

})();