ui: support module

This commit is contained in:
undefined committed 2021-07-25 22:56:38 +08:00
1 parent b4d77d3a2a
commit af26bcb607
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -33,6 +33,7 @@ async function load() {
for (const page of UiContext.extraPages) { for (const page of UiContext.extraPages) {
const head = document.getElementsByTagName('head')[0]; const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script'); const script = document.createElement('script');
if (page.includes('.module.')) script.type = 'module';
script.src = page; script.src = page;
head.appendChild(script); head.appendChild(script);
tasks.push(new Promise((resolve) => { tasks.push(new Promise((resolve) => {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@hydrooj/ui-default", "name": "@hydrooj/ui-default",
"version": "4.13.4", "version": "4.13.5",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "hydro.js", "main": "hydro.js",