diff --git a/src/ts/index.tsx b/src/ts/index.tsx index fd370d4..ab8d25a 100644 --- a/src/ts/index.tsx +++ b/src/ts/index.tsx @@ -206,14 +206,11 @@ async function initEvents() { } function reset() { - //real body shown - //minibar hidden - //initial stuff shown showApplication(true); showNotLoadedControls(); hideErrors(); removeChildren(ui.chatDisplay); - history.replaceState(null, 'MSN Viewer', ''); + history.pushState(null, 'MSN Viewer', '/'); document.title = 'MSN Viewer'; } @@ -221,6 +218,7 @@ async function deleteBackup(e: MouseEvent) { const el = e.currentTarget as HTMLElement; const anchor = el.closest('a.backup-entry') as HTMLAnchorElement | null; const filename = anchor?.dataset['filename']; + if (filename) { if (window.confirm('Do you want to remove ' + filename + ' from the backup list?')) { try { @@ -231,6 +229,7 @@ async function deleteBackup(e: MouseEvent) { populateSavedBackups(); } else { toggleLoadPrevious(false); + reset(); } } catch (e) { displayNonFatalError('Could not remove backup', e as Error);