Add option to show wait time in game card

This commit is contained in:
redphx
2024-07-14 16:44:18 +07:00
parent fcfecf7ff9
commit 1d55026c6d
12 changed files with 242 additions and 12 deletions

View File

@@ -104,6 +104,16 @@ export const createButton = <T=HTMLButtonElement>(options: BxButton): T => {
return $btn as T;
}
export function getReactProps($elm: HTMLElement): any | null {
for (const key in $elm) {
if (key.startsWith('__reactProps')) {
return ($elm as any)[key];
}
}
return null;
}
export function escapeHtml(html: string): string {
const text = document.createTextNode(html);
const $span = document.createElement('span');