diff --git a/chrome/content/zotero/xpcom/connector/translate_item.js b/chrome/content/zotero/xpcom/connector/translate_item.js index d095db85d1..d9012a494c 100644 --- a/chrome/content/zotero/xpcom/connector/translate_item.js +++ b/chrome/content/zotero/xpcom/connector/translate_item.js @@ -23,15 +23,24 @@ ***** END LICENSE BLOCK ***** */ -Zotero.Translate.ItemSaver = function(libraryID, attachmentMode, forceTagType, document, - cookieSandbox) { +/** + * Save translator items. + * + * In the connector these options are actually irrelevent. We're just passing the items to standalone or + * saving to server. + * + * @constructor + * @param {Object} options + *
  • libraryID - ID of library in which items should be saved
  • + *
  • collections - New collections to create (used during Import translation
  • + *
  • attachmentMode - One of Zotero.Translate.ItemSaver.ATTACHMENT_* specifying how attachments should be saved
  • + *
  • forceTagType - Force tags to specified tag type
  • + *
  • cookieSandbox - Cookie sandbox for attachment requests
  • + *
  • baseURI - URI to which attachment paths should be relative
  • + * + */ +Zotero.Translate.ItemSaver = function(options) { this.newItems = []; - this._timeoutID = null; - - if(document) { - this._uri = document.location.toString(); - this._cookie = document.cookie; - } // Add listener for callbacks, but only for Safari or the bookmarklet. In Chrome, we // (have to) save attachments from the inject page. @@ -76,10 +85,6 @@ Zotero.Translate.ItemSaver.prototype = { var me = this; // first try to save items via connector var payload = {"items":items}; - if(this._uri && this._cookie) { - payload.uri = this._uri; - payload.cookie = this._cookie; - } Zotero.Connector.setCookiesThenSaveItems(payload, function(data, status) { if(data !== false) { Zotero.debug("Translate: Save via Standalone succeeded"); diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index e2469af9dc..9b9009de03 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -29,6 +29,7 @@ * @constructor * @param {Object} options *
  • libraryID - ID of library in which items should be saved
  • + *
  • collections - New collections to create (used during Import translation
  • *
  • attachmentMode - One of Zotero.Translate.ItemSaver.ATTACHMENT_* specifying how attachments should be saved
  • *
  • forceTagType - Force tags to specified tag type
  • *
  • cookieSandbox - Cookie sandbox for attachment requests