summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/main.ts13
-rw-r--r--js/page.ts (renamed from js/init.ts)11
2 files changed, 12 insertions, 12 deletions
diff --git a/js/main.ts b/js/main.ts
index 44d28ad..3c3b25b 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -1,8 +1,19 @@
-/// <reference path="init.ts" />
/// <reference path="navigation.ts" />
+/// <reference path="page.ts" />
/// <reference path="theme.ts" />
namespace Ach {
+ export async function init() {
+ Ach.loadTheme();
+
+ Ach.initImages();
+ Ach.initLinks();
+
+ window.addEventListener("popstate", (_e) => {
+ location.reload();
+ });
+ }
+
export function currentPage() {
let body = Ach.getFirstElement(document, "body");
let page = body.getAttribute("data-page");
diff --git a/js/init.ts b/js/page.ts
index 528e0f4..c4f0d71 100644
--- a/js/init.ts
+++ b/js/page.ts
@@ -1,15 +1,4 @@
namespace Ach {
- export async function init() {
- Ach.loadTheme();
-
- Ach.initImages();
- Ach.initLinks();
-
- window.addEventListener("popstate", (_e) => {
- location.reload();
- });
- }
-
export async function initImages() {
let page = Ach.getOnlyElement(document, "page");