Discord Auto Join Button Clicker

自动点击Discord加入按钮

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

(I already have a user script manager, let me install it!)

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         Discord Auto Join Button Clicker
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  自动点击Discord加入按钮
// @author       You
// @match        https://discord.com/channels/*
// @license      MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 等待页面加载完成
    window.addEventListener('load', function() {
        // 尝试查找并点击加入按钮
        function clickJoinButton() {
            const joinButton = document.querySelector('button.joinButton__5aa3a');
            if (joinButton) {
                console.log('找到加入按钮,正在点击...');
                joinButton.click();
            } else {
                console.log('未找到加入按钮,将在1秒后重试...');
                setTimeout(clickJoinButton, 1000);
            }
        }

        // 初始尝试
        clickJoinButton();
    });
})();