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

177
Visualizações
How do I edit a bookmarklet to replace slashes with plus signs, but then add back in a new URL at the beginning?

I need the bookmarklet to do this:

  1. Replace all slashes with plus signs.
  2. Add a new set of text to the beginning, before what was done in step 1.
  3. Open the new URL in a new tab.

For example:

  1. Turn the present page that's open, say https://example.com/files/other/finally, into https://example.com+files+other+finally.
  2. Isolate those items after the primary website name (files+other+finally) and add https://example.com/documents/pages/ to the start, to make it turn into https://example.com/documents/pages/files+other+finally.
  3. Open that final URL in a new tab.

I've tried several things like location.href.split("/").pop()) and others. But I'm completely new to this, so it's confusing, and I'm hoping someone can swoop in to make me understand this.

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