commit 4ea43afb517ec75aad9ebeb668ae215be12eb437
parent 6e85a0440df5e8e6725150379b066f9f2a9d7dc1
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 22 Aug 2011 23:27:23 +0000
Fix exporting properties in Chrome/Safari
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js
@@ -1175,7 +1175,7 @@ Zotero.Translate.Base.prototype = {
Zotero.debug("Translate: Parsing code for "+translator.label, 4);
try {
- this._sandboxManager.eval("var translatorInfo = "+translator.code,
+ this._sandboxManager.eval("var exports = {}, translatorInfo = "+translator.code,
["detect"+this._entryFunctionSuffix, "do"+this._entryFunctionSuffix, "exports"],
(translator.file ? translator.file.path : translator.label));
} catch(e) {
@@ -1193,7 +1193,7 @@ Zotero.Translate.Base.prototype = {
Zotero.debug("Translate: Binding sandbox to "+(typeof this._sandboxLocation == "object" ? this._sandboxLocation.document.location : this._sandboxLocation), 4);
this._sandboxManager = new Zotero.Translate.SandboxManager(this._sandboxLocation);
const createArrays = "['creators', 'notes', 'tags', 'seeAlso', 'attachments']";
- var src = "var Zotero = {}, exports = {};"+
+ var src = "var Zotero = {};"+
"Zotero.Item = function (itemType) {"+
"const createArrays = "+createArrays+";"+
"this.itemType = itemType;"+