From 55666e9f70b07a1108171d820111806e90bfa40c Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 17 Aug 2016 15:03:57 +0200 Subject: [PATCH] remember presentations, and label them correctly on the home page --- customize.dist/main.js | 1 + www/slide/main.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/customize.dist/main.js b/customize.dist/main.js index 238998ecf..54c6bbfcc 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -34,6 +34,7 @@ define([ '/pad/': 'Pad', '/code/': 'Code', '/poll/': 'Poll', + '/slide/': 'Presentation', }; var truncateTitle = function (title, len) { diff --git a/www/slide/main.js b/www/slide/main.js index 9b364ca9c..e84acf255 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -59,6 +59,20 @@ define([ $(window).on('hashchange', function() { 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) {