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

128
Visualizações
Firefox Addon Javascript doesnt get executed when opening a PDF file in the browser

I am trying to write a Firefox Addon which enters the Password to a protected PDF on a website automatically. The Javascript to do this is very straightforward & already works perfectly if entered in the Browser command line. It just doesnt get executed when relying on the Addon.

I tested by replacing all the Javascript with just console.log('Works!'); If i enter any part of the site normally, the String indeed shows up in the console as expected. But if i open the link to the PDF(the PDF is stored on the same website), it simply refuses to execute. I dont even gey any error messages or anything.

Any hint in the right direction would be appreciated!

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

0

Your extension can execute content scripts in the context of web pages.

But PDF documents, even when hosted on web servers, are not web pages. They are displayed by the browser in a different context (the builtin pdf viewer) with elevated privileges.

Access to that context by an extension would be a security disaster.

Perhaps the documentation should reflect that (like "about:debugging" or "about:addons") every tab displaying a pdf is a privileged browser page, where an extension cannot load scripts.

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