aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/help.ts
blob: 10bd86cf344749499ac82f1762a47627b0450f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Config from "./config";
import { showDonationLink } from "./utils/configUtils";

import { localizeHtmlPage } from "./utils/pageUtils";
import { waitFor } from "@ajayyy/maze-utils";

window.addEventListener('DOMContentLoaded', init);

async function init() {
    localizeHtmlPage();

    await waitFor(() => Config.config !== null);

    if (!Config.config.darkMode) {
        document.documentElement.setAttribute("data-theme", "light");
    }

    if (!showDonationLink()) {
        document.getElementById("sbDonate").style.display = "none";
    }
}