Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

113
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda