SnowSteak Verify

SnowSteak verification script (draggable + B toggle)

スクリプトをインストールするには、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         SnowSteak Verify
// @namespace    LC
// @version      0.9
// @description  SnowSteak verification script (draggable + B toggle)
// @author       LC
// @license CC BY-ND 4.0
// @match        https://kour.io/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    GM_addStyle(`
        #snowVerifyContainer {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 9999;
            background: #1a1a1a;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            padding: 15px;
            width: 250px;
            border: 1px solid #333;
            user-select: none;
        }

        #snowVerifyHeader {
            color: #6a4aff;
            margin-bottom: 15px;
            font-size: 16px;
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: move;
        }

        #snowVerifyBtn {
            background: linear-gradient(135deg, #6a4aff, #4a6bff);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            width: 100%;
            transition: all 0.2s;
        }

        #snowVerifyBtn:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .hidden {
            display: none !important;
        }
    `);

    const panelHTML = `
        <div id="snowVerifyContainer">
            <div id="snowVerifyHeader">
                <span>SnowSteak Verify</span>
            </div>
            <button id="snowVerifyBtn">Verify Account</button>
        </div>
    `;

    document.body.insertAdjacentHTML('beforeend', panelHTML);

    const container = document.getElementById('snowVerifyContainer');
    const verifyBtn = document.getElementById('snowVerifyBtn');
    const header = document.getElementById('snowVerifyHeader');

    // ======================
    // B KEY TOGGLE
    // ======================

    document.addEventListener('keydown', (e) => {
        if (e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA") return;

        if (e.key.toLowerCase() === 'b') {
            container.classList.toggle('hidden');
        }
    });

    // ======================
    // DRAG FUNCTION
    // ======================

    let isDragging = false;
    let offsetX = 0;
    let offsetY = 0;

    header.addEventListener('mousedown', (e) => {
        isDragging = true;

        const rect = container.getBoundingClientRect();
        offsetX = e.clientX - rect.left;
        offsetY = e.clientY - rect.top;

        document.addEventListener('mousemove', onMouseMove);
        document.addEventListener('mouseup', stopDragging);
    });

    function onMouseMove(e) {
        if (!isDragging) return;

        container.style.left = (e.clientX - offsetX) + "px";
        container.style.top = (e.clientY - offsetY) + "px";
    }

    function stopDragging() {
        isDragging = false;
        document.removeEventListener('mousemove', onMouseMove);
        document.removeEventListener('mouseup', stopDragging);
    }

    // ======================
    // VERIFY FUNCTION (ohne Textanzeige)
    // ======================

    verifyBtn.addEventListener('click', () => {
        const command = `
            firebase.database().goOffline();
            firebase.database().ref('users/' + firebase.auth().currentUser.uid).child('verified').set('1');
            showUserDetails(firebase.auth().currentUser.email, firebase.auth().currentUser);
            firebase.database().goOnline();
        `;

        setTimeout(() => {
            try {
                eval(command);
            } catch (e) {
                console.error(e);
            }
        }, 500);
    });

})();