diff --git a/src/client/index.mjs b/src/client/index.mjs index 59676486..630e8834 100644 --- a/src/client/index.mjs +++ b/src/client/index.mjs @@ -9,33 +9,17 @@ import * as backup from './backup.mjs' uiLoading(locales('loading_server')) -function init() { - - ipc.init(()=>{ +ipc.init(()=>{ - document.title = TITLE + document.title = TITLE - ipc.send('open', {hotReload: backup.exists}) + ipc.send('open', {hotReload: backup.exists}) - window.onunload = ()=>{ - ipc.send('close') - } + window.onunload = ()=>{ + ipc.send('close') + } - backup.load() + backup.load() - }) - -} - -if (document.requestStorageAccess) { - document.requestStorageAccess().then(init, (e)=>{ - init() - setTimeout(()=>{ - console.error('Could not obtain storage access, the app might not work correctly unless the browser\'s settings are updated') - console.error(e) - }, 1000) - }) -} else { - init() -} +})