www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 9b76f4b5b8162fe9e309f204c563455f23f96d7c
parent ca994fd22b595b742697d7a3a533490bf630c183
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 14 Feb 2012 23:01:44 -0500

Hack to open PDFs in pdf.js when available

Diffstat:
Mchrome/content/zotero/xpcom/mime.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/mime.js b/chrome/content/zotero/xpcom/mime.js @@ -355,6 +355,12 @@ Zotero.MIME = new function(){ return isNative; } + if(mimeType === "application/pdf" + && "@mozilla.org/streamconv;1?from=application/pdf&to=*/*" in Components.classes) { + // PDF can be handled internally if pdf.js is installed + return true; + } + // Is there a better way to get to navigator? var types = Components.classes["@mozilla.org/appshell/appShellService;1"] .getService(Components.interfaces.nsIAppShellService)