Kill loop conform click

Kill learn webset conform click per-30minutes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Kill loop conform click
// @name:zh-CN   杀死循环点击确认
// @namespace    http://github.com/itiharayuuko/
// @version      0.1.2
// @description  Kill learn webset conform click per-30minutes
// @author       ItiharaYuuko
// @match        https://newnhc-kfkc.webtrn.cn/learnspace/learn/learn/templateeight/index.action?*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// @license      MIT
// @description:zh-cn 每学习半小时自动点击确认,解放双手无需值守
// ==/UserScript==

(function() {
    'use strict';

    function kill_loop_click() {
        var time_out = 0;
        var count = 0;
        setInterval(() => {
            if (typeof document.getElementsByClassName("layui-layer-btn0")[0] != "undefined") {
                $(".layui-layer-btn0").trigger("click");
                console.log("Loop conform cracked [" + count + "] times.");
                time_out = 0;
                // document.getElementById("container_display").click();  # V 0.1 Bug code.
                if ($("#player_pause").css("display") != "none"){ // # V 0.1.2  Bug fixed code
                    $("#player_pause").click();
                }
                count += 1;
            }
            console.log("Time elapsed [" + time_out + "s].");
            time_out += 1;
        }, 1000);
    }
    kill_loop_click();
})();