diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-09-06 20:51:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-06 20:51:09 +0200 |
| commit | 84184b35c8564a1c51cc67d9781d2463fd159527 (patch) | |
| tree | ff2d11b06ce91cfdc2c33181fc4a6aa22c854eaf /webAO/dom/onOOCEnter.ts | |
| parent | 6f72f845455f517b47da96c7d3d474c6582000fb (diff) | |
| parent | 34aba3b5b9572b707971d1fda9216ebcf91909ba (diff) | |
Merge pull request #167 from caleb-mabry/move-window-functions
Moving Window Functions pt. 1
Diffstat (limited to 'webAO/dom/onOOCEnter.ts')
| -rw-r--r-- | webAO/dom/onOOCEnter.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webAO/dom/onOOCEnter.ts b/webAO/dom/onOOCEnter.ts new file mode 100644 index 0000000..a6bde4c --- /dev/null +++ b/webAO/dom/onOOCEnter.ts @@ -0,0 +1,16 @@ +import { client } from "../client"; +/** + * Triggered when the Return key is pressed on the out-of-character chat input box. + * @param {KeyboardEvent} event + */ +export function onOOCEnter(event: KeyboardEvent) { + console.log('FUCK') + if (event.keyCode === 13) { + client.sendOOC( + (<HTMLInputElement>document.getElementById("client_oocinputbox")).value + ); + (<HTMLInputElement>document.getElementById("client_oocinputbox")).value = + ""; + } +} +window.onOOCEnter = onOOCEnter; |
