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?)
This commit is contained in:
parent
4c751740b4
commit
ba53f256d6
2 changed files with 3 additions and 2 deletions
|
@ -438,7 +438,7 @@ Zotero.Server.Connector.SaveSnapshot.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// save snapshot
|
// save snapshot
|
||||||
if(filesEditable) {
|
if (filesEditable && !data.skipSnapshot) {
|
||||||
Zotero.Attachments.importFromDocument(doc, itemID);
|
Zotero.Attachments.importFromDocument(doc, itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3146,7 +3146,8 @@ var ZoteroPane = new function()
|
||||||
// In connector, save page via Zotero Standalone
|
// In connector, save page via Zotero Standalone
|
||||||
var doc = window.content.document;
|
var doc = window.content.document;
|
||||||
Zotero.Connector.callMethod("saveSnapshot", {"url":doc.location.toString(),
|
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) {
|
function(returnValue, status) {
|
||||||
_showPageSaveStatus(doc.title);
|
_showPageSaveStatus(doc.title);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue