This commit is contained in:
Dmitry Vasilev
2022-11-24 16:52:59 +08:00
parent c7f5cb231c
commit 77c1df54d4
2 changed files with 24 additions and 13 deletions

View File

@@ -376,14 +376,21 @@
</style>
<script type='module'>
// TODO remove
// Shortcut for log(...) instead of console.log(...)
window.log = console.log
import {init} from './src/index.js'
window.addEventListener('load', () => {
init(document.getElementById('app'))
})
if(new URLSearchParams(window.location.search).get('leporello') == null) {
const {init} = await import('./src/index.js');
(
document.readyState == 'complete'
? Promise.resolve()
: new Promise(resolve =>
window.addEventListener('load', resolve)
)
).then(() => {
init(document.getElementById('app'))
})
}
</script>
</head>