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

206
Visualizações
Temporarily disabling javascript alerts from a certain page?

I'm making code edits to my website within cPanel's file manager. With the latest update of cPanel v.104, after saving my file, control+Z does not revert my changes.

Now, A javascript alert pops up asking: "Are you sure you want to save? The file will be overwritten."

I hypothesize that a redefinition of the alert function, locally via my javascript console could stop this behavior and thus reclaim my control+Z ability.

window.alert = function() {};

Well, this does successfully disable alerts when I throw it in the console. Is it incorrect methodology to paste this in the console? Is there something else I should do?

Here is a thread tracking this issue: https://forums.cpanel.net/threads/cpanel-40934-website-com-says-are-you-sure-you-want-to-save-the-file-will-be-overwritten.701853/

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

0

Alert box is used to provide the user some information. When trying to receive approval or disapproval, confirm() is used.

Try pasting this code in your web dev tools console.

window.confirm = function() {};
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