diff options
Diffstat (limited to 'webAO/dom/changeBackgroundOOC.ts')
| -rw-r--r-- | webAO/dom/changeBackgroundOOC.ts | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/webAO/dom/changeBackgroundOOC.ts b/webAO/dom/changeBackgroundOOC.ts deleted file mode 100644 index abf3a97..0000000 --- a/webAO/dom/changeBackgroundOOC.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { client } from "../client"; -import queryParser from "../utils/queryParser"; - -let { mode } = queryParser(); - -/** - * Change background via OOC. - */ -export function changeBackgroundOOC() { - const selectedBG = <HTMLSelectElement>document.getElementById("bg_select"); - const changeBGCommand = "bg $1"; - const bgFilename = <HTMLInputElement>document.getElementById("bg_filename"); - - let filename = ""; - if (selectedBG.selectedIndex === 0) { - filename = bgFilename.value; - } else { - filename = selectedBG.value; - } - - if (mode === "join") { - client.sendOOC(`/${changeBGCommand.replace("$1", filename)}`); - } else if (mode === "replay") { - client.sendSelf(`BN#${filename}#%`); - } -} -window.changeBackgroundOOC = changeBackgroundOOC;
\ No newline at end of file |
