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

595
Visualizações
How to locate a javascript file in current webpage?

The current webpage can use ‘$CS.function_name’ to call some functions. I wonder how to find which js file does the ‘$CS’ come from?

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

0

This action takes a bit of detective work. You'll have to learn how to use the debugger in the browser and dig into all included javascript files that your code uses. In those files, search for the reference of $CS and see if that is the original $CS you wish to track down. Inside that source file, assuming that include has the function, search for it. Once found, breakpoint it and then watch for it to be hit as you debug through your code. I had to do some detective work myself looking for a bug and eventually found it in a third-party javascript file. While the bug was minor, fixing it helped me come to a solution.

In Chrome, you can hit F12. A panel will open on the right which will give you many tools to use. Inside the SOURCES tab, you'll find the files that are being used on the web page. You'll find other windows below that give you the ability to put in breakpoints, watch variables as well as a plethora of other things. I would suggest googling "Debugging javascript using Chrome" and taking some lessons on how to debug a page using Chrome or other similar browsers.

about 4 years ago · Juan Pablo Isaza Relatório

0

If $CS.function_name is a function being called on a page then you must be viewing the code. If it is not declared in the current file, you will find it in the imports at the top of the file. The import statement will tell you which .js file the $CS object comes from.

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