Fix lingering bugs in Chrome/Safari translation

This commit is contained in:
Simon Kornblith 2011-06-17 18:20:50 +00:00
parent e1258f1013
commit e35c25e31d
2 changed files with 2 additions and 3 deletions

View File

@ -34,7 +34,6 @@ Zotero.Translate.ItemSaver.ATTACHMENT_MODE_FILE = 2;
Zotero.Translate.ItemSaver.prototype = { Zotero.Translate.ItemSaver.prototype = {
"saveItem":function(item) { "saveItem":function(item) {
this.newItems.push(item); this.newItems.push(item);
Zotero.debug("Saving item"); Zotero.Connector.callMethod("saveItems", {"items":[item]}, function(success) {});
Zotero.Connector.callMethod("saveItems", {"items":[item]});
} }
}; };

View File

@ -327,7 +327,7 @@ Zotero.Translator.prototype.preprocessCode = function(code) {
if(!Zotero.isFx) { if(!Zotero.isFx) {
const foreach = /^(\s*)for each\s*\((var )?([^ ]+) in (.*?)\)(\s*){/m; const foreach = /^(\s*)for each\s*\((var )?([^ ]+) in (.*?)\)(\s*){/m;
code = code.replace(foreach, "$1var $3_zForEachSubject = $4; "+ code = code.replace(foreach, "$1var $3_zForEachSubject = $4; "+
"for(var $3_zForEachIndex in $4_zForEachSubject)$5{ "+ "for(var $3_zForEachIndex in $3_zForEachSubject)$5{ "+
"$2$3 = $3_zForEachSubject[$3_zForEachIndex];", code); "$2$3 = $3_zForEachSubject[$3_zForEachIndex];", code);
Zotero.debug(code); Zotero.debug(code);
} }