commit ba53f256d6c7bb3b26d9bec8f6e35d2a399f8cf7
parent 4c751740b4ea1ac188ebbd13c916b3e5d4f22399
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 1 Jul 2015 00:53:20 -0400
Quick hack to fix "without snapshot" save option in Z4Fx via Standalone
(I don't see any obvious reason I can't do this. We should probably clean this
up later, not call the endpoint "saveSnapshot", etc. Also, is there a reason it
doesn't follow the snapshot pref by default?)
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js
@@ -438,7 +438,7 @@ Zotero.Server.Connector.SaveSnapshot.prototype = {
}
// save snapshot
- if(filesEditable) {
+ if (filesEditable && !data.skipSnapshot) {
Zotero.Attachments.importFromDocument(doc, itemID);
}
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -3146,7 +3146,8 @@ var ZoteroPane = new function()
// In connector, save page via Zotero Standalone
var doc = window.content.document;
Zotero.Connector.callMethod("saveSnapshot", {"url":doc.location.toString(),
- "cookie":doc.cookie, "html":doc.documentElement.innerHTML},
+ "cookie":doc.cookie, "html":doc.documentElement.innerHTML,
+ "skipSnapshot": saveSnapshot === false || (saveSnapshot === true ? false : undefined)},
function(returnValue, status) {
_showPageSaveStatus(doc.title);
});