云学堂视频不暂停

自动跳过云学堂继续学习的弹窗

// ==UserScript==
// @name 云学堂视频不暂停
// @version 0.10
// @description 自动跳过云学堂继续学习的弹窗
// @author CNBruceLee
// @match *://*.yunxuetang.cn/*
// @connect CNBruceLee
// @namespace com.brucelee
// ==/UserScript==

(function() {

	setInterval(autoContinue, 1000);
	function autoContinue() {

		var continueBtn = document.querySelector("#reStartStudy");
		if (continueBtn && continueBtn.click) {

			var imitateMousedown = document.createEvent("MouseEvents");
			imitateMousedown.initEvent("mousedown", true, true);
			continueBtn.dispatchEvent(imitateMousedown);
			continueBtn.click();

			if (console && console.log) {
				console.log('找到并点击了[继续学习]');
			}
		}
	}
})();