diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index f6d7d678bb..7736b0494e 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -1069,7 +1069,13 @@ var ZoteroPane = new function() { var file = attachment.getFile(); if (file){ - if (Zotero.MIME.fileHasInternalHandler(file)) + var mimeType = attachment.getAttachmentMimeType(); + if (mimeType) { + var ext = Zotero.File.getExtension(file); + var internal = Zotero.MIME.hasInternalHandler(mimeType, ext); + } + + if (internal || Zotero.MIME.fileHasInternalHandler(file)) { window.loadURI(attachment.getLocalFileURL()); } diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index e49b343234..3f46ff3f8f 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -442,7 +442,7 @@ Zotero.Attachments = new function(){ // leaving the transaction open if the callback never triggers Zotero.DB.commitTransaction(); - if (Zotero.MIME.isDocumentType(mimeType)) { + if (mimeType == 'text/html') { Zotero.debug('Saving with saveDocument()'); wbp.saveDocument(document, file, destDir, mimeType, encodingFlags, false); } diff --git a/chrome/content/zotero/xpcom/mime.js b/chrome/content/zotero/xpcom/mime.js index a36c6b6344..d98bb5a59d 100644 --- a/chrome/content/zotero/xpcom/mime.js +++ b/chrome/content/zotero/xpcom/mime.js @@ -26,7 +26,6 @@ Zotero.MIME = new function(){ this.sniffForBinary = sniffForBinary; this.getMIMETypeFromData = getMIMETypeFromData; this.getMIMETypeFromFile = getMIMETypeFromFile; - this.isDocumentType = isDocumentType; this.hasNativeHandler = hasNativeHandler; this.hasInternalHandler = hasInternalHandler; this.fileHasInternalHandler = fileHasInternalHandler; @@ -42,14 +41,6 @@ Zotero.MIME = new function(){ ["