diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/main.ts | 13 | ||||
-rw-r--r-- | js/page.ts (renamed from js/init.ts) | 11 |
2 files changed, 12 insertions, 12 deletions
@@ -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"); @@ -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"); |