Vortex Verify

Vortex verification script (draggable + B toggle)

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Vortex Verify
// @namespace    LC
// @version      1.1
// @description  Vortex 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(`
        #vortexVerifyContainer {
            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;
        }

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

        #vortexVerifyBtn {
            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;
        }

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

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

    const panelHTML = `
        <div id="vortexVerifyContainer">
            <div id="vortexVerifyHeader">
                Vortex Verify
            </div>
            <button id="vortexVerifyBtn">Verify Account</button>
        </div>
    `;

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

    const container = document.getElementById('vortexVerifyContainer');
    const verifyBtn = document.getElementById('vortexVerifyBtn');
    const header = document.getElementById('vortexVerifyHeader');

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

})();