Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
URL abierta de Javascript después de la redirección del sitio

Estoy creando una secuencia de comandos en Greasemonkey. Hará lo siguiente: mirar si la URL incluye "ABC", si incluye extraer la ID y crear una nueva URL con la ID extraída, este sitio principal redirigirá a otro sitio, espere la redirección para abrir nuevo sitio.

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); }

Hago este script y funciona bien, pero no sé cómo hacer que esto abra la nueva URL solo cuando mainsite.com redirija a otro sitio y no inmediatamente.

Otra idea, reviso y el sitio carga esto:

 <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">

¿Es posible abrir la URL después de que esto desaparezca?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!