Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!