remove getPadTitle

This commit is contained in:
ansuz 2017-04-14 11:41:18 +02:00
parent f42da4ecd8
commit 8f4dbcf4c6
2 changed files with 0 additions and 35 deletions

View File

@ -562,32 +562,6 @@ load pinpad dynamically only after you know that it will be needed */
});
};
// STORAGE
var getPadTitle = common.getPadTitle = function (cb) {
var href = window.location.href;
var parsed = parsePadUrl(window.location.href);
var hashSlice = window.location.hash.slice(1,9); // TODO remove
var title = '';
getRecentPads(function (err, pads) {
if (err) {
cb(err);
return;
}
pads.some(function (pad) {
var p = parsePadUrl(pad.href);
if (p.hash === parsed.hash && p.type === parsed.type) {
title = pad.title || hashSlice;
return true;
}
});
if (title === '') { title = getDefaultName(parsed, pads); }
cb(void 0, title);
});
};
var errorHandlers = [];
common.onError = function (h) {
if (typeof h !== "function") { return; }

View File

@ -781,15 +781,6 @@ define([
}
Cryptpad.onDisplayNameChanged(setName);
Cryptpad.getPadTitle(function (err, title) {
if (err) {
error(err);
debug("Couldn't get pad title");
return;
}
updateTitle(title || defaultName);
});
};
// don't initialize until the store is ready.