Super Terminal Mobile

Caixa para colar scripts e executar direto na página

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

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

})();