制杖树 (已失效)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==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);
})();