display only style name in the editor tab title
"Edit Style" was redundant and made the title unreadable when many tabs were opened. "Add Style" is still displayed for the new styles.
This commit is contained in:
parent
1b7c131c37
commit
eff0a7030c
|
@ -406,11 +406,10 @@ function validate() {
|
|||
}
|
||||
|
||||
function updateTitle() {
|
||||
const DIRTY_TITLE = '* $';
|
||||
const name = $('#name').savedValue;
|
||||
const clean = isCleanGlobal();
|
||||
const title = styleId === null ? t('addStyleTitle') : t('editStyleTitle', [name]);
|
||||
document.title = clean ? title : DIRTY_TITLE.replace('$', title);
|
||||
const title = styleId === null ? t('addStyleTitle') : name;
|
||||
document.title = (clean ? '' : '* ') + title;
|
||||
window.onbeforeunload = clean ? null : beforeUnload;
|
||||
$('#save-button').disabled = clean;
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ function createSourceEditor(style) {
|
|||
|
||||
function updateTitle() {
|
||||
const newTitle = (dirty.isDirty() ? '* ' : '') +
|
||||
(style.id ? t('editStyleTitle', [style.name]) : t('addStyleTitle'));
|
||||
(style.id ? style.name : t('addStyleTitle'));
|
||||
if (document.title !== newTitle) {
|
||||
document.title = newTitle;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user