Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

129
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda