|
|
@ -1200,6 +1200,11 @@ define([
|
|
|
|
if (!parsed.type || !parsed.hashData) { return void cb('E_INVALID_HREF'); }
|
|
|
|
if (!parsed.type || !parsed.hashData) { return void cb('E_INVALID_HREF'); }
|
|
|
|
hashes = Hash.getHashes(secret);
|
|
|
|
hashes = Hash.getHashes(secret);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If the current href is an edit one, return the existing hashes
|
|
|
|
|
|
|
|
var parsedHash = parsed.hashData;
|
|
|
|
|
|
|
|
if (!parsedHash || parsedHash.mode === 'edit') { return void cb(null, hashes); }
|
|
|
|
|
|
|
|
if (parsedHash.type !== 'pad') { return void cb(null, hashes); }
|
|
|
|
|
|
|
|
|
|
|
|
if (secret.version === 0) {
|
|
|
|
if (secret.version === 0) {
|
|
|
|
// It means we're using an old hash
|
|
|
|
// It means we're using an old hash
|
|
|
|
hashes.editHash = window.location.hash.slice(1);
|
|
|
|
hashes.editHash = window.location.hash.slice(1);
|
|
|
@ -1212,9 +1217,7 @@ define([
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
postMessage("GET_STRONGER_HASH", {
|
|
|
|
postMessage("GET_STRONGER_HASH", {
|
|
|
|
href: window.location.href,
|
|
|
|
channel: secret.channel
|
|
|
|
channel: secret.channel,
|
|
|
|
|
|
|
|
password: secret.password
|
|
|
|
|
|
|
|
}, function (hash) {
|
|
|
|
}, function (hash) {
|
|
|
|
if (hash) { hashes.editHash = hash; }
|
|
|
|
if (hash) { hashes.editHash = hash; }
|
|
|
|
cb(null, hashes);
|
|
|
|
cb(null, hashes);
|
|
|
|