remember presentations, and label them correctly on the home page

pull/1/head
ansuz 8 years ago
parent 5a3da11c40
commit 55666e9f70

@ -34,6 +34,7 @@ define([
'/pad/': 'Pad', '/pad/': 'Pad',
'/code/': 'Code', '/code/': 'Code',
'/poll/': 'Poll', '/poll/': 'Poll',
'/slide/': 'Presentation',
}; };
var truncateTitle = function (title, len) { var truncateTitle = function (title, len) {

@ -59,6 +59,20 @@ define([
$(window).on('hashchange', function() { $(window).on('hashchange', function() {
window.location.reload(); window.location.reload();
}); });
Cryptpad.getPadTitle(function (err, title) {
if (err) {
console.error(err);
console.log("Couldn't get pad title");
return;
}
document.title = title || window.location.hash.slice(1, 9);
Cryptpad.rememberPad(title, function (err, data) {
if (err) {
console.log("Couldn't remember pad");
console.error(err);
}
});
});
}; };
var onRemote = config.onRemote = function (info) { var onRemote = config.onRemote = function (info) {

Loading…
Cancel
Save