Prompt.js for the web

prompt.js to change the web

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Prompt.js for the web
// @name:pt-br   Prompt.js para a web
// @namespace    greasyfork.org
// @version      1.0.0
// @description  prompt.js to change the web
// @description:pt-br prompt.js para mudar a web
// @match        *://*/*
// @license      MIT
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function () {
  // Painel prompt.js
  const painel = document.createElement('div');
  Object.assign(painel.style, {
    position: 'fixed',
    bottom: '10px',
    right: '10px',
    width: '320px',
    background: '#222',
    color: '#fff',
    padding: '10px',
    borderRadius: '8px',
    zIndex: 9999,
    fontFamily: 'monospace'
  });

  // Área de texto = prompt.js
  const textarea = document.createElement('textarea');
  textarea.placeholder = 'Escreva seu código JS (prompt.js)...';
  Object.assign(textarea.style, {
    width: '100%',
    height: '120px',
    marginBottom: '8px',
    fontFamily: 'monospace'
  });

  // Botão Executar prompt.js
  const executar = document.createElement('button');
  executar.textContent = 'Executar prompt.js';
  Object.assign(executar.style, {
    width: '100%',
    padding: '6px',
    background: '#4caf50',
    color: '#fff',
    border: 'none',
    borderRadius: '4px',
    cursor: 'pointer'
  });

  executar.onclick = () => {
    try {
      new Function(textarea.value)();
    } catch (e) {
      alert('Erro: ' + e.message);
    }
  };

  painel.appendChild(textarea);
  painel.appendChild(executar);
  document.body.appendChild(painel);
})();