2021-12-28 17:48:21 +00:00

24 lines
515 B
JavaScript

async function main() {
var apps = await core.apps();
var doc = `<!DOCTYPE html>
<html>
<body style="background: #888">
<h1>Apps</h1>
<ul id="apps"></ul>
</body>
<script>
var apps = ${JSON.stringify(apps)};
for (let app of Object.keys(apps)) {
var li = document.getElementById('apps').appendChild(document.createElement('li'));
var a = document.createElement('a');
a.innerText = app;
a.href = '../' + app;
a.target = '_top';
li.appendChild(a);
}
</script>
</html>`
app.setDocument(doc);
}
main();