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

105
Vistas
Javascript open URL after site redirect

I am making a script in greasemonkey, It will do the next: Look if URL include "ABC" if it include extract the ID, and make new url with the ID extracted, this mainsite will redirect to another site, wait for redirect for open new site.

https://mainsite.com/ABC.aspx?123=XXX&TEST=321&SSID=00000000-0000-0000-0000-000000000000

if (window.location.href.indexOf("ABC") > -1) {
  const url = document.URL
  const id = url.split('=').pop();
  var newURL = "https://newsite.com/" + id
  window.location.replace(newURL);
}

I make this script and work fine but I don't know how to make this open the new url only when mainsite.com redirect to another site and not immediately.

Other idea, I check and the site load this:

<img alt="Loading" style="position: absolute; top: 50%; left: 50%; margin-top: -24px; margin-left: -24px" src="aprt/images/loader-green.gif" width="48" height="48">

its possible open the url after this disappear?

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