Fix undefined title in slides present mode

pull/1/head
yflory 8 years ago
parent ff16084719
commit a6c49cd65c

@ -491,11 +491,11 @@ define([
Slide.onChange(function (o, n, l) { Slide.onChange(function (o, n, l) {
if (n !== null) { if (n !== null) {
document.title = APP.title + ' (' + (++n) + '/' + l + ')'; document.title = Title.title + ' (' + (++n) + '/' + l + ')';
return; return;
} }
console.log("Exiting presentation mode"); console.log("Exiting presentation mode");
document.title = APP.title; document.title = Title.title;
}); });
Cryptpad.removeLoadingScreen(); Cryptpad.removeLoadingScreen();

@ -211,7 +211,10 @@ define([
$(ifrw).focus(); $(ifrw).focus();
change(null, Slide.index); change(null, Slide.index);
if (!isPresentURL()) { 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-present-button').hide();
$pad.contents().find('.cryptpad-source-button').show(); $pad.contents().find('.cryptpad-source-button').show();
@ -220,7 +223,7 @@ define([
$('.top-bar').hide(); $('.top-bar').hide();
return; return;
} }
window.location.hash = window.location.hash.replace(/\/present$/, ''); window.location.hash = window.location.hash.replace(/\/present$/, '/');
change(Slide.index, null); change(Slide.index, null);
$pad.contents().find('.cryptpad-present-button').show(); $pad.contents().find('.cryptpad-present-button').show();
$pad.contents().find('.cryptpad-source-button').hide(); $pad.contents().find('.cryptpad-source-button').hide();

Loading…
Cancel
Save