diff --git a/edit/edit.js b/edit/edit.js index f19225dd..45c6b555 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -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; } diff --git a/edit/source-editor.js b/edit/source-editor.js index 70247027..90fc6106 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -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; }