diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 750476f1f9..11ffeacd0c 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -1729,7 +1729,7 @@ this._addCreatorRow = false; //Filter out bad names - var nameArray = [tempName for each(tempName in rawNameArray) if(tempName)]; + var nameArray = rawNameArray.filter(name => name); //If not adding names at the end of the creator list, make new creator //entries and then shift down existing creators. diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index f9074ab249..a48ac8450e 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -328,7 +328,7 @@ var Zotero_File_Interface = new function() { translation.setHandler("done", function(obj, worked) { // add items to import collection if(importCollection) { - importCollection.addItems([item.id for each(item in obj.newItems)]); + importCollection.addItems(obj.newItems.map(item => item.id)); } Zotero.DB.commitTransaction(); @@ -467,7 +467,10 @@ var Zotero_File_Interface = new function() { getService(Components.interfaces.nsIClipboard); var style = Zotero.Styles.get(style).getCiteProc(locale); - var citation = {"citationItems":[{id:item.id} for each(item in items)], properties:{}}; + var citation = { + citationItems: items.map(item => ({ id: item.id })), + properties: {} + }; // add HTML var bibliography = style.previewCitationCluster(citation, [], [], "html"); diff --git a/chrome/content/zotero/integration/editBibliographyDialog.js b/chrome/content/zotero/integration/editBibliographyDialog.js index f9663dde2d..067bedcbe8 100644 --- a/chrome/content/zotero/integration/editBibliographyDialog.js +++ b/chrome/content/zotero/integration/editBibliographyDialog.js @@ -99,7 +99,7 @@ var Zotero_Bibliography_Dialog = new function () { _addButton.disabled = true; _removeButton.disabled = false; _updateRevertButtonStatus(); - [_itemList.toggleItemSelection(item) for each(item in itemsToSelect)]; + itemsToSelect.forEach(item => _itemList.toggleItemSelection(item)); _itemList.ensureIndexIsVisible(itemsToSelect[0]); } _suppressAllSelectEvents = false; diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 95f24e1761..abecb23309 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -303,9 +303,13 @@ var Zotero_QuickFormat = new function () { citedItemsMatchingSearch = []; for(var i=0, iCount=citedItems.length; i { + creator.ref.firstName + " " + creator.ref.lastName + }) + .concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)]) + .join(" "); // See if words match for(var j=0, jCount=splits.length; j