Add slide number in the title in slide2
This commit is contained in:
@@ -107,12 +107,28 @@ define([
|
||||
});
|
||||
});
|
||||
|
||||
var currentTitle;
|
||||
var currentTabTitle;
|
||||
var setDocumentTitle = function () {
|
||||
if (!currentTabTitle) {
|
||||
document.title = currentTitle || 'CryptPad';
|
||||
return;
|
||||
}
|
||||
var title = currentTabTitle.replace(/\{title\}/g, currentTitle || 'CryptPad');
|
||||
document.title = title;
|
||||
};
|
||||
sframeChan.on('Q_SET_PAD_TITLE_IN_DRIVE', function (newTitle, cb) {
|
||||
document.title = newTitle;
|
||||
currentTitle = newTitle;
|
||||
setDocumentTitle();
|
||||
Cryptpad.renamePad(newTitle, undefined, function (err) {
|
||||
if (err) { cb('ERROR'); } else { cb(); }
|
||||
});
|
||||
});
|
||||
sframeChan.on('EV_SET_TAB_TITLE', function (newTabTitle) {
|
||||
currentTabTitle = newTabTitle;
|
||||
setDocumentTitle();
|
||||
});
|
||||
|
||||
|
||||
sframeChan.on('Q_SETTINGS_SET_DISPLAY_NAME', function (newName, cb) {
|
||||
Cryptpad.setDisplayName(newName, function (err) {
|
||||
|
||||
Reference in New Issue
Block a user