Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

321
Vistas
How to change the *actual* value of DOM Input Text Object in Tampermonkey

I am new to Javascript and trying to write a script in tampermonkey to create a button that generates emails on getnada.com

The problem is when you want to create a new email the webpage shows a random combination of username and domain, and I wrote a script that changes the value of the username to a string and the value of the domain to a specific domain, and they do change but when I create the email the webpage creates it according to the values that it showed in the first place not the values that my code entered. here is my script:

// ==UserScript==
// @name         test
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://getnada.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function randStr(len) {
  let s = '';
  while (s.length < len) s += Math.random().toString(36).substr(2, len - s.length);
  return s;
}
    let btn = document.createElement("button");
btn.innerHTML = "Click Me";
document.body.appendChild(btn);
    btn.onclick = function () {
        document.getElementsByClassName("mt-4 bg-white text-gray-800 active:bg-gray-100 text-xs font-bold uppercase px-4 py-2 rounded shadow hover:shadow-md outline-none focus:outline-none lg:mr-1 lg:mb-0 mb-3")[0].click();
        var delayInMilliseconds = 1
        setTimeout(function() {
            document.querySelector("#grid-first-name").value = randStr(10);
            document.querySelector("#__layout > div > div > div.container.mx-auto.px-4.mb-20 > nav > div.fixed.inset-0.w-full.h-screen.flex.items-center.justify-center.bg-smoke-800.z-50 > div > div > div > form > div > div.inline-block.relative.w-64 > select").value="getnada.com"
            }, delayInMilliseconds);
    }
})();

now what am I doing wrong and how to fix it?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda