Auto comment NimoTv

Comment nimotv interval

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Auto comment NimoTv
// @namespace    http://tampermonkey.net/
// @version      0.1.4
// @description  Comment nimotv interval
// @author       Duclh
// @match        https://www.nimo.tv/ngansatthu
// @icon         https://www.google.com/s2/favicons?domain=nimo.tv
// @grant        none
// ==/UserScript==


var chatInputElem = "nimo-chat-box__input"
var sendButtonElem = "nimo-chat-box__send-btn"

var sendButton = ""
var chatbox = ""

//let commentMode = 1

var comments = [
    "Donate cho chị Hai tại đây nha: https://vrstudio.vn/nst"
]
//var commentIdx = 0

var everySec = 1000 * 60 // Số sau số 1000 là giây

var checkExist = setInterval(function() {
    console.log("Tik")
    if (document.getElementsByClassName(chatInputElem)) {
        chatbox = document.getElementsByClassName(chatInputElem)[0]
        chatbox.value = comments[0];
    }

     if (document.getElementsByClassName(sendButtonElem)) {
        sendButton = document.getElementsByClassName(sendButtonElem)[0]
        sendButton.click()
    }

}, everySec);