SnowSteak Verify

SnowSteak verification script (draggable + B toggle)

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==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);
    });

})();