commit b75b36fa771de78982cc37b986059e0a0ab621a4
parent 4901870c8a467b909d143fe94232944a120db853
Author: Simon Kornblith <simon@simonster.com>
Date: Wed, 3 Aug 2011 20:51:26 +0000
Closes #1875, [PATCH] Add ISI to MIME type-detected imports
Thanks to ajlyon for the patch
Diffstat:
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/xpcom/mimeTypeHandler.js b/chrome/content/zotero/xpcom/mimeTypeHandler.js
@@ -52,6 +52,8 @@ Zotero.MIMETypeHandler = new function () {
if(Zotero.Prefs.get("parseEndNoteMIMETypes")) {
this.addHandler("application/x-endnote-refer", _importHandler, true);
this.addHandler("application/x-research-info-systems", _importHandler, true);
+ // Add ISI
+ this.addHandler("application/x-inst-for-Scientific-info", _importHandler, true);
//
// And some non-standard ones
//
@@ -90,9 +92,9 @@ Zotero.MIMETypeHandler = new function () {
/**
- * Handles Refer/RIS MIME types
- * @param {String} string The Refer/RIS formatted records
- * @param {String} uri The URI from which the Refer/RIS formatted records were downloaded
+ * Handles Refer/RIS/ISI MIME types
+ * @param {String} string The Refer/RIS/ISI formatted records
+ * @param {String} uri The URI from which the Refer/RIS/ISI formatted records were downloaded
*/
function _importHandler(string, uri, contentType, channel) {
var win = channel.notificationCallbacks.getInterface(Components.interfaces.nsIDOMWindow).top;
@@ -171,7 +173,7 @@ Zotero.MIMETypeHandler = new function () {
if(!translators.length) {
// we lied. we can't really translate this file.
frontWindow.Zotero_Browser.progress.close();
- throw "No translator found for handled RIS or Refer file"
+ throw "No translator found for handled RIS, Refer or ISI file"
}
// translate using first available
@@ -348,4 +350,4 @@ Zotero.MIMETypeHandler = new function () {
this._storageStream.close();
}
-}
-\ No newline at end of file
+}