diff --git a/build.ts b/build.ts
index ca89f19..6007528 100644
--- a/build.ts
+++ b/build.ts
@@ -18,6 +18,12 @@ if (urlMaybe && URL.canParse(urlMaybe)) {
}
let entryPoints: {sPath: string; newPath: string}[] = [];
async function bundleFiles() {
+ const filter = new Set();
+ entryPoints = entryPoints.filter((_) => {
+ if (filter.has(_.sPath)) return false;
+ filter.add(_.sPath);
+ return true;
+ });
let mod = await swc.bundle(
entryPoints.map(({sPath}) => {
return {
diff --git a/src/webpage/404.html b/src/webpage/404.html
index 2ec8a3c..1c77c2e 100644
--- a/src/webpage/404.html
+++ b/src/webpage/404.html
@@ -1,6 +1,7 @@
+
It seems you're lost
@@ -49,6 +50,6 @@
-
+
diff --git a/src/webpage/404.ts b/src/webpage/404.ts
index c84aae0..c1f941c 100644
--- a/src/webpage/404.ts
+++ b/src/webpage/404.ts
@@ -1,37 +1,38 @@
import {I18n} from "./i18n";
import {setTheme, SW} from "./utils/utils";
+if (document.getElementById("404-page")) {
+ await setTheme();
+ await I18n.done;
+ I18n.translatePage();
-await setTheme();
-await I18n.done;
-I18n.translatePage();
+ const easterEvents = [
+ () => {
+ window.open("https://youtube.com/watch?v=dQw4w9WgXcQ");
+ },
+ () => {
+ window.open("https://youtube.com/watch?v=fC7oUOUEEi4");
+ },
+ () => {
+ alert(I18n[404].whatelse());
+ },
+ ];
-const easterEvents = [
- () => {
- window.open("https://youtube.com/watch?v=dQw4w9WgXcQ");
- },
- () => {
- window.open("https://youtube.com/watch?v=fC7oUOUEEi4");
- },
- () => {
- alert(I18n[404].whatelse());
- },
-];
+ const where = document.getElementById("whereever");
+ if (where) {
+ where.onclick = () => {
+ const event = easterEvents[Math.floor(Math.random() * easterEvents.length)];
+ event();
+ };
+ }
+ while (true) {
+ await new Promise((res) => setTimeout(res, 100));
-const where = document.getElementById("whereever");
-if (where) {
- where.onclick = () => {
- const event = easterEvents[Math.floor(Math.random() * easterEvents.length)];
- event();
- };
-}
-while (true) {
- await new Promise((res) => setTimeout(res, 100));
-
- if (SW.worker) {
- const valid = await SW.isValid(window.location.href);
- if (valid) {
- window.location.reload();
+ if (SW.worker) {
+ const valid = await SW.isValid(window.location.href);
+ if (valid) {
+ window.location.reload();
+ }
+ break;
}
- break;
}
}
diff --git a/src/webpage/audio/index.html b/src/webpage/audio/index.html
index 9f4932e..7dcf8bd 100644
--- a/src/webpage/audio/index.html
+++ b/src/webpage/audio/index.html
@@ -35,5 +35,5 @@