Space Theme for StumbleChat (Stealth)

Space theme with anti-detection measures

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Space Theme for StumbleChat (Stealth)
// @namespace    http://tampermonkey.net/
// @version      3.0
// @description  Space theme with anti-detection measures
// @author       You
// @match        https://stumblechat.com/room/*
// @grant        GM_addStyle
// @grant        GM_xmlhttpRequest
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // Randomize function and variable names to avoid detection
    const randomString = (length = 10) => {
        const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        let result = '';
        for (let i = 0; i < length; i++) {
            result += chars.charAt(Math.floor(Math.random() * chars.length));
        }
        return result;
    };

    // Create a random namespace for our functions
    const namespace = randomString(8);
    window[namespace] = {};

    // Obfuscate the CSS injection
    const injectStyles = function() {
        try {
            const styleElement = document.createElement('style');
            styleElement.id = randomString(12);
            styleElement.textContent = `
                /* Space Theme CSS */
                body {
                    background: linear-gradient(135deg, #0a0a2e 0%, #16213e 50%, #0f3460 100%) !important;
                    color: #e0e0e0 !important;
                }

                #room {
                    background: rgba(10, 10, 46, 0.8) !important;
                    border-radius: 10px !important;
                    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3) !important;
                }

                #userlist {
                    background: rgba(15, 52, 96, 0.7) !important;
                    border-right: 1px solid rgba(138, 43, 226, 0.3) !important;
                }

                .room-name {
                    color: #a78bfa !important;
                    text-shadow: 0 0 10px rgba(167, 139, 250, 0.5) !important;
                }

                #chat-wrapper {
                    background: rgba(15, 52, 96, 0.7) !important;
                    border-left: 1px solid rgba(138, 43, 226, 0.3) !important;
                }

                #chat-content {
                    background: rgba(10, 10, 46, 0.5) !important;
                    border-radius: 8px !important;
                    margin: 5px !important;
                    padding: 10px !important;
                }

                #textarea {
                    background: rgba(10, 10, 46, 0.7) !important;
                    border: 1px solid rgba(138, 43, 226, 0.5) !important;
                    color: #e0e0e0 !important;
                    border-radius: 5px !important;
                }

                #videos {
                    background: rgba(10, 10, 46, 0.5) !important;
                }

                .header {
                    background: rgba(15, 52, 96, 0.7) !important;
                    border-bottom: 1px solid rgba(138, 43, 226, 0.3) !important;
                }

                button, .dropbtn {
                    background: linear-gradient(135deg, #3a1c71, #d76d77, #ffaf7b) !important;
                    border: none !important;
                    color: white !important;
                    border-radius: 5px !important;
                    transition: all 0.3s ease !important;
                }

                button:hover, .dropbtn:hover {
                    background: linear-gradient(135deg, #d76d77, #ffaf7b, #3a1c71) !important;
                    box-shadow: 0 0 10px rgba(255, 175, 123, 0.5) !important;
                }

                .list li {
                    background: rgba(15, 52, 96, 0.5) !important;
                    border-radius: 5px !important;
                    margin: 3px 0 !important;
                    padding: 5px !important;
                    transition: all 0.3s ease !important;
                }

                .list li:hover {
                    background: rgba(58, 28, 113, 0.5) !important;
                    transform: translateX(5px) !important;
                }

                #chat-content > div {
                    background: rgba(10, 10, 46, 0.3) !important;
                    border-radius: 5px !important;
                    padding: 5px !important;
                    margin: 3px 0 !important;
                    border-left: 3px solid #8a2be2 !important;
                }

                .user-menu, .video-menu {
                    background: linear-gradient(135deg, #16213e, #0f3460) !important;
                    border: 1px solid rgba(138, 43, 226, 0.5) !important;
                    border-radius: 10px !important;
                    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3) !important;
                }

                .user-menu-item, .video-menu-item {
                    border-bottom: 1px solid rgba(138, 43, 226, 0.2) !important;
                }

                .user-menu-item:hover, .video-menu-item:hover {
                    background: rgba(58, 28, 113, 0.3) !important;
                }

                .on-white-scroll::-webkit-scrollbar {
                    width: 8px !important;
                }

                .on-white-scroll::-webkit-scrollbar-track {
                    background: rgba(10, 10, 46, 0.3) !important;
                    border-radius: 4px !important;
                }

                .on-white-scroll::-webkit-scrollbar-thumb {
                    background: linear-gradient(135deg, #8a2be2, #ffaf7b) !important;
                    border-radius: 4px !important;
                }
            `;

            // Hide the style element to avoid detection
            styleElement.style.display = 'none';

            // Add the style to head in a stealthy way
            const head = document.head || document.getElementsByTagName('head')[0];
            if (head) {
                head.appendChild(styleElement);
            }

            return styleElement.id;
        } catch (e) {
            console.error('Style injection failed:', e);
            return null;
        }
    };

    // Create starfield with stealth techniques
    window[namespace].createStarfield = function() {
        try {
            const containerId = randomString(10);
            const starsContainer = document.createElement('div');
            starsContainer.id = containerId;
            starsContainer.className = 'stars-container';
            starsContainer.style.position = 'fixed';
            starsContainer.style.top = '0';
            starsContainer.style.left = '0';
            starsContainer.style.width = '100%';
            starsContainer.style.height = '100%';
            starsContainer.style.pointerEvents = 'none';
            starsContainer.style.zIndex = '-1';

            // Create stars
            for (let i = 0; i < 200; i++) {
                const star = document.createElement('div');
                star.className = 'star';
                star.style.position = 'absolute';
                star.style.backgroundColor = 'white';
                star.style.borderRadius = '50%';
                star.style.left = Math.random() * 100 + '%';
                star.style.top = Math.random() * 100 + '%';

                const size = Math.random() * 3;
                star.style.width = size + 'px';
                star.style.height = size + 'px';
                star.style.animation = `twinkle ${3 + Math.random() * 2}s infinite`;
                star.style.animationDelay = Math.random() * 3 + 's';

                starsContainer.appendChild(star);
            }

            // Create planets
            for (let i = 0; i < 3; i++) {
                const planet = document.createElement('div');
                planet.className = 'planet';
                planet.style.position = 'absolute';
                planet.style.borderRadius = '50%';
                planet.style.opacity = '0.7';
                planet.style.left = Math.random() * 100 + '%';
                planet.style.top = Math.random() * 100 + '%';

                const size = 30 + Math.random() * 50;
                planet.style.width = size + 'px';
                planet.style.height = size + 'px';

                const colors = [
                    'linear-gradient(135deg, #ff6b6b, #4ecdc4)',
                    'linear-gradient(135deg, #8a2be2, #ffaf7b)',
                    'linear-gradient(135deg, #ff9a00, #ff00ff)'
                ];
                planet.style.background = colors[Math.floor(Math.random() * colors.length)];
                planet.style.animation = `float ${15 + Math.random() * 10}s infinite linear`;

                starsContainer.appendChild(planet);
            }

            // Add animation keyframes if not already added
            if (!document.getElementById('space-animations')) {
                const animStyle = document.createElement('style');
                animStyle.id = 'space-animations';
                animStyle.textContent = `
                    @keyframes twinkle {
                        0% { opacity: 0.3; }
                        50% { opacity: 1; }
                        100% { opacity: 0.3; }
                    }
                    @keyframes float {
                        0% { transform: translateY(0) rotate(0deg); }
                        50% { transform: translateY(-20px) rotate(180deg); }
                        100% { transform: translateY(0) rotate(360deg); }
                    }
                `;
                document.head.appendChild(animStyle);
            }

            document.body.appendChild(starsContainer);
            return containerId;
        } catch (e) {
            console.error('Starfield creation failed:', e);
            return null;
        }
    };

    // Add space emoji button with stealth
    window[namespace].addSpaceEmojis = function() {
        try {
            const textarea = document.getElementById('textarea');
            if (!textarea) return false;

            const emojiButtonId = randomString(10);
            const emojiButton = document.createElement('button');
            emojiButton.id = emojiButtonId;
            emojiButton.textContent = '🪐';
            emojiButton.style.position = 'absolute';
            emojiButton.style.right = '10px';
            emojiButton.style.top = '5px';
            emojiButton.style.background = 'transparent';
            emojiButton.style.border = 'none';
            emojiButton.style.fontSize = '20px';
            emojiButton.style.cursor = 'pointer';
            emojiButton.style.zIndex = '10';

            const spaceEmojis = ['🚀', '🪐', '🌌', '⭐', '🌟', '🌠', '🌙', '🛸', '👽', '🛰️', '🌍', '🌎', '🌏', '☄️'];

            emojiButton.addEventListener('click', function() {
                const randomEmoji = spaceEmojis[Math.floor(Math.random() * spaceEmojis.length)];
                textarea.value += randomEmoji;
                textarea.focus();
            });

            textarea.parentElement.style.position = 'relative';
            textarea.parentElement.appendChild(emojiButton);
            return emojiButtonId;
        } catch (e) {
            console.error('Space emoji button creation failed:', e);
            return false;
        }
    };

    // Main initialization function with stealth
    window[namespace].initTheme = function() {
        try {
            // Inject styles
            const styleId = injectStyles();

            // Create starfield
            const starsId = window[namespace].createStarfield();

            // Add space emojis after a delay
            setTimeout(function() {
                window[namespace].addSpaceEmojis();
            }, 1000);

            // Store references for potential cleanup
            window[namespace].elements = {
                style: styleId,
                stars: starsId
            };

            return true;
        } catch (e) {
            console.error('Theme initialization failed:', e);
            return false;
        }
    };

    // Override common detection methods
    const originalQuerySelector = document.querySelector;
    document.querySelector = function(selector) {
        if (selector && selector.includes('userscript') && selector.includes('tampermonkey')) {
            return null;
        }
        return originalQuerySelector.call(this, selector);
    };

    // Override console methods to hide our traces
    const originalLog = console.log;
    console.log = function() {
        if (arguments[0] && typeof arguments[0] === 'string' &&
            (arguments[0].includes('tampermonkey') || arguments[0].includes('userscript'))) {
            return;
        }
        return originalLog.apply(console, arguments);
    };

    // Initialize with a delay to avoid detection
    setTimeout(function() {
        if (document.readyState === 'complete' || document.readyState === 'interactive') {
            window[namespace].initTheme();
        } else {
            window.addEventListener('load', function() {
                window[namespace].initTheme();
            });
        }
    }, Math.random() * 1000 + 500);
})();