client: don't request storage access at all, it's not needed for toplevel site

This commit is contained in:
jean-emmanuel 2025-12-19 09:14:37 +01:00
parent 89b68c8009
commit 2a4412e726

View file

@ -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()
}
})