Fix debug app

pull/1/head
yflory 5 years ago
parent 5673aa687c
commit 4e7bb57129

@ -31,6 +31,7 @@ define([
var initialPathInDrive; var initialPathInDrive;
var currentPad = window.CryptPad_location = { var currentPad = window.CryptPad_location = {
app: '',
href: cfg.href || window.location.href, href: cfg.href || window.location.href,
hash: cfg.hash || window.location.hash hash: cfg.hash || window.location.hash
}; };
@ -172,6 +173,8 @@ define([
}); });
}); });
var parsed = Utils.Hash.parsePadUrl(currentPad.href);
currentPad.app = parsed.type;
if (cfg.getSecrets) { if (cfg.getSecrets) {
var w = waitFor(); var w = waitFor();
// No password for drive, profile and todo // No password for drive, profile and todo
@ -183,7 +186,6 @@ define([
}); });
})); }));
} else { } else {
var parsed = Utils.Hash.parsePadUrl(currentPad.href);
var todo = function () { var todo = function () {
secret = Utils.secret = Utils.Hash.getSecrets(parsed.type, parsed.hash, password); secret = Utils.secret = Utils.Hash.getSecrets(parsed.type, parsed.hash, password);
Cryptpad.getShareHashes(secret, waitFor(function (err, h) { Cryptpad.getShareHashes(secret, waitFor(function (err, h) {
@ -460,7 +462,7 @@ define([
additionalPriv.registeredOnly = true; additionalPriv.registeredOnly = true;
} }
if (['debug', 'profile'].indexOf(parsed.type) !== -1) { if (['debug', 'profile'].indexOf(currentPad.app) !== -1) {
additionalPriv.hashes = hashes; additionalPriv.hashes = hashes;
} }

Loading…
Cancel
Save