diff --git a/index.html b/index.html index ba1cefa..2d7f25a 100644 --- a/index.html +++ b/index.html @@ -376,14 +376,21 @@ diff --git a/src/editor/ui.js b/src/editor/ui.js index 00002e8..af6a7cb 100644 --- a/src/editor/ui.js +++ b/src/editor/ui.js @@ -195,14 +195,18 @@ export class UI { click: e => e.stopPropagation(), change: this.change_entrypoint, }, - Object.keys(state.files).sort().map(f => - el('option', - state.entrypoint == f - ? { value: f, selected: true } - : { value: f}, - f == '' ? "*scratch*" : f + Object + .keys(state.files) + .sort() + .filter(f => f == '' || f.endsWith('.js') || f.endsWith('.mjs')) + .map(f => + el('option', + state.entrypoint == f + ? { value: f, selected: true } + : { value: f}, + f == '' ? "*scratch*" : f + ) ) - ) ) ) }