Super Terminal Mobile

Caixa para colar scripts e executar direto na página

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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

})();