diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index 6463d38034..50ac1019b4 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -400,7 +400,7 @@ var Zotero_File_Interface = new function() { * * Does not check that items are actual references (and not notes or attachments) */ - function copyItemsToClipboard(items, style, asHTML) { + function copyItemsToClipboard(items, style, asHTML, asCitations) { // copy to clipboard var transferable = Components.classes["@mozilla.org/widget/transferable;1"]. createInstance(Components.interfaces.nsITransferable); @@ -409,7 +409,7 @@ var Zotero_File_Interface = new function() { var style = Zotero.Styles.get(style); // add HTML - var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "html"); + var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "html", asCitations); var str = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); str.data = bibliography; @@ -418,7 +418,7 @@ var Zotero_File_Interface = new function() { // add text (or HTML source) if(!asHTML) { - var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "text"); + var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "text", asCitations); } var str = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); @@ -500,13 +500,7 @@ var Zotero_File_Interface = new function() { // generate bibliography try { if(io.method == 'copy-to-clipboard') { - if (io.mode == 'citation') { - copyCitationToClipboard(items, io.style); - } - else { - copyItemsToClipboard(items, io.style); - } - return; + copyItemsToClipboard(items, io.style, false, io.mode === "citation"); } else { var style = Zotero.Styles.get(io.style);