mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
WIP
This commit is contained in:
15
index.html
15
index.html
@@ -376,14 +376,21 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type='module'>
|
<script type='module'>
|
||||||
// TODO remove
|
// Shortcut for log(...) instead of console.log(...)
|
||||||
window.log = console.log
|
window.log = console.log
|
||||||
|
|
||||||
import {init} from './src/index.js'
|
if(new URLSearchParams(window.location.search).get('leporello') == null) {
|
||||||
|
const {init} = await import('./src/index.js');
|
||||||
window.addEventListener('load', () => {
|
(
|
||||||
|
document.readyState == 'complete'
|
||||||
|
? Promise.resolve()
|
||||||
|
: new Promise(resolve =>
|
||||||
|
window.addEventListener('load', resolve)
|
||||||
|
)
|
||||||
|
).then(() => {
|
||||||
init(document.getElementById('app'))
|
init(document.getElementById('app'))
|
||||||
})
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -195,7 +195,11 @@ export class UI {
|
|||||||
click: e => e.stopPropagation(),
|
click: e => e.stopPropagation(),
|
||||||
change: this.change_entrypoint,
|
change: this.change_entrypoint,
|
||||||
},
|
},
|
||||||
Object.keys(state.files).sort().map(f =>
|
Object
|
||||||
|
.keys(state.files)
|
||||||
|
.sort()
|
||||||
|
.filter(f => f == '' || f.endsWith('.js') || f.endsWith('.mjs'))
|
||||||
|
.map(f =>
|
||||||
el('option',
|
el('option',
|
||||||
state.entrypoint == f
|
state.entrypoint == f
|
||||||
? { value: f, selected: true }
|
? { value: f, selected: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user