Script by CryptoXSS

Es Un script sencillo, lo que hace es poner caracteres aleatorios fuera de los corchetes.

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        Script by CryptoXSS
// @namespace   https://github.com/CryptoXSS/
// @version     1.0.2
// @author      CryptoXSS
// @match       *://gota.io/*
// @icon        https://i.imgur.com/ejxjYj4.gif
// @license MIT
// @description  Es Un script sencillo, lo que hace es poner caracteres aleatorios fuera de los corchetes.
// ==/UserScript==


let interval;

document.addEventListener("keydown", function(event) {
  if (event.code === "KeyF") {
    if (!interval) {
      interval = setInterval(run, 1000);
      alert("Activado");
    } else {
      clearInterval(interval);
      interval = null;
      alert("Desactivado");
    }
  }
});



function generateRandomString() {
  const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+";
  let result = "";
  const length = 10; // Puedes ajustar la longitud de caracteres raros según tu preferencia

  for (let i = 0; i < length; i++) {
    const randomIndex = Math.floor(Math.random() * characters.length);
    result += characters.charAt(randomIndex);
  }

  return result;
}

function run() {
  console.log("Changing skin");
  const inputElement = document.getElementsByClassName("gota-input")[0];
  const currentInputValue = inputElement.value;

  // Buscar corchetes "[" y "]"
  const startIndex = currentInputValue.indexOf("[");
  const endIndex = currentInputValue.indexOf("]");

  if (startIndex !== -1 && endIndex !== -1 && startIndex < endIndex) {
    const contentBeforeBrackets = currentInputValue.slice(0, startIndex + 1);
    const contentInsideBrackets = currentInputValue.slice(startIndex + 1, endIndex);
    const contentAfterBrackets = currentInputValue.slice(endIndex + 1);

    // Generar una cadena aleatoria para reemplazar el contenido antes de los corchetes
    const newContentBeforeBrackets = generateRandomString();

    // Reemplazar el contenido antes de los corchetes y agregar un espacio
    const modifiedValue = `${newContentBeforeBrackets} [${contentInsideBrackets}]${contentAfterBrackets}`;

    inputElement.value = modifiedValue;
  } else {
    // Si no hay corchetes en el input, no se realiza ningún cambio
    // Puedes agregar aquí tu lógica adicional si es necesario
  }
}