Kill loop conform click

Kill learn webset conform click per-30minutes

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

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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