Fix pad creation in pad2

This commit is contained in:
yflory
2017-08-21 14:41:56 +02:00
parent 140c6f3776
commit e4020ba8d4
3 changed files with 14 additions and 8 deletions

View File

@@ -1803,13 +1803,15 @@ define([
return $userAdmin;
};
common.getShareHashes = function (cb) {
common.getShareHashes = function (secret, cb) {
if (!window.location.hash) {
var hashes = common.getHashes(secret.channel, secret);
return void cb(null, hashes);
}
common.getRecentPads(function (err, recent) {
var parsed = parsePadUrl(window.location.href);
if (!parsed.type || !parsed.hashData) { return void cb('E_INVALID_HREF'); }
var secret = common.getSecrets(parsed.type, parsed.hash);
var channel = common.base64ToHex(parsed.hashData.channel);
var hashes = common.getHashes(channel, secret);
var hashes = common.getHashes(secret.channel, secret);
var options = [];
// If we have a stronger version in drive, add it and add a redirect button

View File

@@ -6,7 +6,7 @@ define(['jquery'], function ($) {
exp.defaultTitle = Common.getDefaultTitle();
exp.title = document.title; // TOOD slides
exp.title = document.title;
cfg = cfg || {};