|
|
@ -726,7 +726,7 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
// The first "cp" in history is the empty doc. It doesn't include the first patch
|
|
|
|
// The first "cp" in history is the empty doc. It doesn't include the first patch
|
|
|
|
// of the history
|
|
|
|
// of the history
|
|
|
|
var initialCp = major === 0;
|
|
|
|
var initialCp = major === 0 || !cp.hash;
|
|
|
|
var messages = (data.messages || []).slice(initialCp ? 0 : 1, minor);
|
|
|
|
var messages = (data.messages || []).slice(initialCp ? 0 : 1, minor);
|
|
|
|
|
|
|
|
|
|
|
|
messages.forEach(function (obj) {
|
|
|
|
messages.forEach(function (obj) {
|
|
|
@ -1719,11 +1719,11 @@ define([
|
|
|
|
// store media blobUrl and content for cache and export
|
|
|
|
// store media blobUrl and content for cache and export
|
|
|
|
var mediaData = { blobUrl : blobUrl, content : "" };
|
|
|
|
var mediaData = { blobUrl : blobUrl, content : "" };
|
|
|
|
mediasData[data.src] = mediaData;
|
|
|
|
mediasData[data.src] = mediaData;
|
|
|
|
downloadImages[name].fire();
|
|
|
|
|
|
|
|
var reader = new FileReader();
|
|
|
|
var reader = new FileReader();
|
|
|
|
reader.onloadend = function () {
|
|
|
|
reader.onloadend = function () {
|
|
|
|
debug("MediaData set");
|
|
|
|
debug("MediaData set");
|
|
|
|
mediaData.content = reader.result;
|
|
|
|
mediaData.content = reader.result;
|
|
|
|
|
|
|
|
downloadImages[name].fire();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
reader.readAsArrayBuffer(res.content);
|
|
|
|
reader.readAsArrayBuffer(res.content);
|
|
|
|
debug("Adding CryptPad Image " + data.name + ": " + blobUrl);
|
|
|
|
debug("Adding CryptPad Image " + data.name + ": " + blobUrl);
|
|
|
|