制杖树 (已失效)

[已失效] 自动关闭弹窗(需要事先答题)并继续播放

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         制杖树 (已失效)
// @namespace    http://tampermonkey.net/
// @version      0.2
// @license      unlicense
// @description  [已失效] 自动关闭弹窗(需要事先答题)并继续播放
// @author       PRO
// @match        https://studyh5.zhihuishu.com/videoStudy.html*
// @icon         http://www.zhihuishu.com/favicon.ico
// @grant        GM_registerMenuCommand
// ==/UserScript==

var interval;
(function() {
    'use strict';
    function del() {
        var a = document.querySelector("#app > div > div.el-dialog__wrapper.dialog-test > div > div.el-dialog__footer > span > div");
        if (a) {
            a.click();
        };
        var b = document.getElementsByClassName('playButton')[0];
        if (b) {
            document.getElementsByClassName('videoArea')[0].click();
        };
    }
    var interval;
    function script_on() {interval = setInterval(del, 5000); console.log(interval);}
    function script_off() {clearInterval(interval);}
    GM_registerMenuCommand("打开脚本", script_on);
    GM_registerMenuCommand("关闭脚本", script_off);
})();