mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-02 21:44:06 +08:00
Use onDocumentReady
This commit is contained in:
parent
63956f33d4
commit
75af7f743e
3 changed files with 6 additions and 6 deletions
|
|
@ -10,7 +10,7 @@ import * as Skeleton from "../utils/skeleton";
|
|||
import { TypingStats, SpeedHistogram } from "@monkeytype/schemas/public";
|
||||
import { getNumberWithMagnitude, numberWithSpaces } from "../utils/numbers";
|
||||
import { tryCatch } from "@monkeytype/util/trycatch";
|
||||
import { qs, qsr } from "../utils/dom";
|
||||
import { qs, qsr, onDocumentReady } from "../utils/dom";
|
||||
|
||||
function reset(): void {
|
||||
qs(".pageAbout .contributors")?.empty();
|
||||
|
|
@ -212,6 +212,6 @@ export const page = new Page({
|
|||
},
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
onDocumentReady(() => {
|
||||
Skeleton.save("pageAbout");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { ValidatedHtmlInputElement } from "../elements/input-validation";
|
|||
import { isDevEnvironment } from "../utils/misc";
|
||||
import { z } from "zod";
|
||||
import { remoteValidation } from "../utils/remote-validation";
|
||||
import { qs, qsr } from "../utils/dom";
|
||||
import { qs, qsr, onDocumentReady } from "../utils/dom";
|
||||
|
||||
let registerForm: {
|
||||
name?: string;
|
||||
|
|
@ -224,6 +224,6 @@ export const page = new Page({
|
|||
},
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
onDocumentReady(() => {
|
||||
Skeleton.save("pageLogin");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ValidatedHtmlInputElement } from "../elements/input-validation";
|
|||
import { UserNameSchema, UserProfile } from "@monkeytype/schemas/users";
|
||||
import { remoteValidation } from "../utils/remote-validation";
|
||||
import * as NavigationEvent from "../observables/navigation-event";
|
||||
import { qs, qsr } from "../utils/dom";
|
||||
import { qs, qsr, onDocumentReady } from "../utils/dom";
|
||||
|
||||
let nameInputEl: ValidatedHtmlInputElement | null = null;
|
||||
let lastProfile: UserProfile | null = null;
|
||||
|
|
@ -69,6 +69,6 @@ qs(".page.pageProfileSearch form")?.on("submit", (e) => {
|
|||
});
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
onDocumentReady(() => {
|
||||
Skeleton.save("pageProfileSearch");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue