Telegram-mini-app-start

A super simple hack script that automatically clicks the start button of the Telegram mini app! Let's enjoy it little by little!

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name     Telegram-mini-app-start
// @name:ja     テレグラムミニアプリ自動スタート
// @match    https://web.telegram.org/*
// @namespace    https://blog.nyanco.me/telegram-mini-app-play-btn-auto-click/
// @version      1.0
// @description  A super simple hack script that automatically clicks the start button of the Telegram mini app! Let's enjoy it little by little!
// @description:ja  テレグラムのミニアプリのスタートボタンを自動クリックする超シンプルなハックスクリプト!少しずつ楽しよう!
// @author       Nikutama(https://x.com/MeatBallCat2929)
// @match    https://web.telegram.org/*
// @grant        none
// @run-at       document-end
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    window.addEventListener('load', function() {
        console.log('Page has been fully loaded');

        // Execute with a slight delay (adjust as needed)
        setTimeout(function() {
            // Get button element using XPath
            var xpath = "//div[contains(@class, 'new-message-bot-commands')]";
            var result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
            var button = result.singleNodeValue;

            // Click the button if it exists
            if (button) {
                console.log('Button found. Clicking.');
                button.click();
            } else {
                console.log('Button not found.');
            }
        }, 2000); // Execute after x seconds (adjust as needed) 1000 = 1 second
    });
})();