diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-09-04 22:30:31 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-09-04 22:30:31 +0200 |
| commit | 1e3fde25b9f6d8adbdf087a51a34dc35cc1907d8 (patch) | |
| tree | 6b0c33270bc7ec96ab7dbe3381870babeb60a179 /webAO/dom/updateBackgroundPreview.ts | |
| parent | 975fb353dd7f5bec7bcb836f4ceb86fae9b70340 (diff) | |
undo dom stuff
Diffstat (limited to 'webAO/dom/updateBackgroundPreview.ts')
| -rw-r--r-- | webAO/dom/updateBackgroundPreview.ts | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/webAO/dom/updateBackgroundPreview.ts b/webAO/dom/updateBackgroundPreview.ts deleted file mode 100644 index e55bf60..0000000 --- a/webAO/dom/updateBackgroundPreview.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { AO_HOST } from "../client"; - -/** - * Update background preview. - */ -export function updateBackgroundPreview() { - const background_select = <HTMLSelectElement>( - document.getElementById("bg_select") - ); - const background_filename = <HTMLInputElement>( - document.getElementById("bg_filename") - ); - const background_preview = <HTMLImageElement>( - document.getElementById("bg_preview") - ); - - if (background_select.selectedIndex === 0) { - background_filename.style.display = "initial"; - background_preview.src = `${AO_HOST}background/${encodeURI( - background_filename.value.toLowerCase() - )}/defenseempty.png`; - } else { - background_filename.style.display = "none"; - background_preview.src = `${AO_HOST}background/${encodeURI( - background_select.value.toLowerCase() - )}/defenseempty.png`; - } -} -window.updateBackgroundPreview = updateBackgroundPreview;
\ No newline at end of file |
