Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I get the selected action of content type by javascript from Firefox>Options>Applications?

  • 3 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 3 views
  • Last reply by cor-el

I works on my website, and it have to check the PDF file will be opened in which plugins So we have to implement some javascript to check the selected action of Content Type from Tool>Options>Application Do we have any javascript code to check this

I works on my website, and it have to check the PDF file will be opened in which plugins So we have to implement some javascript to check the selected action of Content Type from Tool>Options>Application Do we have any javascript code to check this

All Replies (3)

You can't check this with code that runs on the server or via JavaScript in the web page.

Note that current Firefox version do not expose the built-in PDF Reader via the navigator.plugin array, so if you can't detect a plugin than maybe assume that the built-in PDF reader is used with Firefox version 19 and later.

  • Bug 840439 - Expose PDF.JS as a plugin navigator.plugins when enabled

my issue is: If my FF installed adobe reader already, but in option>application. I still select "Preview In Firefox" So, I can detect the plugin exist or not but I can not check what selected option In my picture, I installed Adobe and Foxit but the selection is Preview in FF and I expected that I can detect the browser is using Preview in FF to show PDF

You can change the action for Portable Document Format (PDF) from Preview in Firefox to use the Adobe Reader or set to Always Ask in "Firefox > Options/Preferences > Applications".

You can set the pdfjs.disabled pref to true on the about:config page to disable the build-in PDF viewer.
You can also check the value of the plugin.disable_full_page_plugin_for_types pref and remove the application/pdf part if present.

See also: