Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit 50d9f72b3a

@ -101,11 +101,11 @@ define([], function () {
xhr.open("GET", src, true);
xhr.responseType = "arraybuffer";
xhr.onload = function () {
if ([200, 304].indexOf(this.status) === -1) {
return CB('XHR_ERROR');
}
return void CB(void 0, new Uint8Array(xhr.response));
};
xhr.onerror = function () {
CB('XHR_ERROR');
};
xhr.send(null);
};

@ -20,11 +20,6 @@ define([
Cryptpad.addLoadingScreen();
var andThen = function () {
$(window.document).on('decryption', function (e) {
var decrypted = e.originalEvent;
console.log(decrypted.blob, decrypted.metadata);
});
var $bar = $iframe.find('.toolbar-container');
var secret = Cryptpad.getSecrets();
@ -71,11 +66,16 @@ define([
$mt.attr('data-crypto-key', 'cryptpad:'+cryptKey);
$mt.attr('data-type', type);
window.onMediaMetadata = function (metadata) {
$(window.document).on('decryption', function (e) {
var decrypted = e.originalEvent;
var metadata = decrypted.metadata;
console.log(metadata);
console.log(defaultName);
if (!metadata || metadata.name !== defaultName) { return; }
var title = document.title = metadata.name;
updateTitle(title || defaultName);
};
});
require(['/common/media-tag.js'], function (MediaTag) {
var configTb = {

Loading…
Cancel
Save