Super Terminal Mobile

Caixa para colar scripts e executar direto na página

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Super Terminal Mobile
// @namespace    http://tampermonkey.net/
// @version      3.0
// @description  Caixa para colar scripts e executar direto na página
// @author       Gemini
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Criar o container principal
    const container = document.createElement('div');
    Object.assign(container.style, {
        position: 'fixed',
        bottom: '10px',
        right: '10px',
        zIndex: '1000000',
        backgroundColor: '#222',
        padding: '10px',
        borderRadius: '10px',
        display: 'none', // Começa escondido
        flexDirection: 'column',
        gap: '10px',
        width: '250px',
        border: '1px solid #444'
    });

    // Criar a área de texto (onde você cola o script)
    const textarea = document.createElement('textarea');
    textarea.placeholder = 'Cole o script aqui...';
    Object.assign(textarea.style, {
        width: '100%',
        height: '100px',
        backgroundColor: '#000',
        color: '#0f0',
        fontSize: '12px',
        border: '1px solid #555',
        borderRadius: '5px',
        fontFamily: 'monospace'
    });

    // Botão de Executar
    const btnRodar = document.createElement('button');
    btnRodar.innerHTML = 'RODAR SCRIPT';
    Object.assign(btnRodar.style, {
        backgroundColor: '#28a745',
        color: 'white',
        border: 'none',
        padding: '10px',
        borderRadius: '5px',
        fontWeight: 'bold',
        cursor: 'pointer'
    });

    // Botão de Abrir/Fechar o painel
    const btnToggle = document.createElement('button');
    btnToggle.innerHTML = 'JS';
    Object.assign(btnToggle.style, {
        position: 'fixed',
        bottom: '20px',
        right: '20px',
        zIndex: '1000001',
        backgroundColor: '#007bff',
        color: 'white',
        border: 'none',
        borderRadius: '50%',
        width: '50px',
        height: '50px',
        fontWeight: 'bold',
        boxShadow: '0 4px 10px rgba(0,0,0,0.5)'
    });

    // Lógica de abrir e fechar
    btnToggle.onclick = () => {
        container.style.display = container.style.display === 'none' ? 'flex' : 'none';
    };

    // Lógica de execução
    btnRodar.onclick = () => {
        try {
            const codigo = textarea.value;
            const scriptFunc = new Function(codigo);
            scriptFunc();
            alert('Executado com sucesso!');
        } catch (e) {
            alert('Erro no Script: ' + e);
        }
    };

    // Montar a estrutura
    container.appendChild(textarea);
    container.appendChild(btnRodar);
    document.body.appendChild(container);
    document.body.appendChild(btnToggle);

})();