Auto Click Chatbox

This script automatically clicks the "Message Input" button on the sidebar, on kick.com.

Version vom 15.11.2023. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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        Auto Click Chatbox
// @namespace https://greasyfork.org/en/users/1200587-trilla-g
// @match       *://*.kick.com/*
// @grant       none
// @version     1.0
// @license     MIT
// @author  Trilla_G
// @description This script automatically clicks the "Message Input" button on the sidebar, on kick.com.
// ==/UserScript==

(function() {
    'use strict';

    function clickMessageInput() {
        var messageInputButton = document.querySelector('#message-input');
        if (messageInputButton) {
            var clickEvent = document.createEvent('MouseEvents');
            clickEvent.initEvent('click', true, true);
            messageInputButton.dispatchEvent(clickEvent);
        }
    }

    // Create a MutationObserver to retrigger on hashchange
    const observer = new MutationObserver(() => {
        console.log('Hashchange event detected. Retriggering script.');
        clickMessageInput();
    });

    // Configure and start observing changes to the URL hash
    const config = { childList: true, subtree: true };
    observer.observe(document.body, config);

    // Initial click and observe hashchange
    setTimeout(function() {
        clickMessageInput();
    }, 2000);
})();