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

228
Visualizações
How can I redirect a specific URL to another after a delay?

whenever I end up on a certain page, which has a certain URL ("A"), i want my browser (Chromium) to wait there 10 seconds (without doing nothing else) and then automatically redirect me to another specific URL ("B")

"A" is a page on a website that sometimes is automatically redirected to "B" in a few fractions of a second (if some conditions are satisfied), but sometimes isn't and it remains stuck there for the rest of its lifetime

I want to force the redirection to happen in every case, and 10 seconds are enough to see if the automatic redirection happened or I have to make it happen in another way

I've found several Chrome extensions that can set up an automatic redirect request, like Requestly or Redirector, but with none of those it's possible to add a "waiting" feature before the redirection

however, Requestly (the most advanced one) allows to load custom CSS or JS code to run it

I don't know absolutely nothing about programming, so what could I write to make the extension do what I want to do?

at least two algorithms could work; a simpler one "detects when I end up on "A", wait 10 s and then redirect to "B" no matter what", or a more sophisticated one "detects when I end up on "A", wait 10 s, see if I'm still on "A" and if yes then redirect to "B" "

thanks in advance for the help!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

setTimeout(
  function() {
    window.location.replace("http://stackoverflow.com");
  }, 10000);

EDIT:

If you want it to work for a specific page, you can wrap it with an if statement.

if (window.location.href === 'https://youtube.com') {
      setTimeout(
        function() {
          window.location.replace("http://stackoverflow.com");
        }, 10000);
}
about 4 years ago · Juan Pablo Isaza Relatório
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