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

107
Visualizações
Speed up page loading with below scripts (dual language page)

I have the following scripts for dual language page (this is an overhaul of initial single-language webpage). What I am trying to achieve here if to change the words in HTML instead of using bulk edit function in Shopify or any other apps. However, if there are 1000s of them the webpage loading will be impeded seriously. Anyway to optimise it?

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>

<script>

if ( window.location.href.indexOf(".com/zh") == -1) {
  
  String.prototype.replaceAll = function(search, replacement) {
    var target = this;
    return target.replace(new RegExp(search, 'g'), replacement);
  };  
  
  
   $("div").html(function() { return $(this).html().replaceAll("steady", "安定");  }); 
   $("div").html(function() { return $(this).html().replaceAll("doctor", "医者");  }); 

  ;    
  
}

</script>

Thanks.

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