Kick Auto Reject Raid

Automatically reject incoming raids on Kick.com レイドを自動的に拒否します

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

You will need to install an extension such as Tampermonkey 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.

You will need to install a user script manager extension 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.

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

// ==UserScript==
// @name         Kick Auto Reject Raid
// @namespace    kick-auto-reject
// @version      1.0
// @description  Automatically reject incoming raids on Kick.com レイドを自動的に拒否します
// @match        https://kick.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function rejectRaid() {
        // ボタン候補を広めに探索(UI変更対策)
        const buttons = Array.from(document.querySelectorAll('button'));

        for (const btn of buttons) {
            const text = btn.innerText?.toLowerCase();

            if (!text) continue;

            // 「reject」「decline」などを検知
            if (
                text.includes('拒否') ||
                text.includes('decline') ||
                text.includes('reject')
            ) {
                console.log('[Kick Auto Reject] Raid rejected');
                btn.click();
                return;
            }
        }
    }

    // モーダル出現を検知するための監視
    const observer = new MutationObserver(() => {
        rejectRaid();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

    // 念のため定期チェック
    setInterval(rejectRaid, 2000);
})();