Hack to open PDFs in pdf.js when available

This commit is contained in:
Simon Kornblith 2012-02-14 23:01:44 -05:00
parent ca994fd22b
commit 9b76f4b5b8

View file

@ -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)