diff --git a/www/slide/main.js b/www/slide/main.js index 3b01ae9fd..b3d1209fd 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -491,11 +491,11 @@ define([ Slide.onChange(function (o, n, l) { if (n !== null) { - document.title = APP.title + ' (' + (++n) + '/' + l + ')'; + document.title = Title.title + ' (' + (++n) + '/' + l + ')'; return; } console.log("Exiting presentation mode"); - document.title = APP.title; + document.title = Title.title; }); Cryptpad.removeLoadingScreen(); diff --git a/www/slide/slide.js b/www/slide/slide.js index c9e6f3dcd..912820390 100644 --- a/www/slide/slide.js +++ b/www/slide/slide.js @@ -211,7 +211,10 @@ define([ $(ifrw).focus(); change(null, Slide.index); if (!isPresentURL()) { - window.location.hash += '/present'; + if (window.location.href.slice(-1) !== '/') { + window.location.hash += '/'; + } + window.location.hash += 'present'; } $pad.contents().find('.cryptpad-present-button').hide(); $pad.contents().find('.cryptpad-source-button').show(); @@ -220,7 +223,7 @@ define([ $('.top-bar').hide(); return; } - window.location.hash = window.location.hash.replace(/\/present$/, ''); + window.location.hash = window.location.hash.replace(/\/present$/, '/'); change(Slide.index, null); $pad.contents().find('.cryptpad-present-button').show(); $pad.contents().find('.cryptpad-source-button').hide();