diff options
| author | Caleb <caleb.mabry.15@cnu.edu> | 2022-09-04 00:02:19 -0400 |
|---|---|---|
| committer | Caleb <caleb.mabry.15@cnu.edu> | 2022-09-04 00:02:19 -0400 |
| commit | 67314a8bc22ea198b8e3de788282a0ca0151cb1e (patch) | |
| tree | 92d827d3acd06bc1e33fc94c45a0be3613a95ae3 /webAO/dom/onOOCEnter.ts | |
| parent | d20994bd7c244cc84ab138cec441b05c261a83e4 (diff) | |
Several functions moved
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..a24928b --- /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) { + if (event.keyCode === 13) { + client.sendOOC( + (<HTMLInputElement>document.getElementById("client_oocinputbox")).value + ); + (<HTMLInputElement>document.getElementById("client_oocinputbox")).value = + ""; + } + } + window.onOOCEnter = onOOCEnter; +
\ No newline at end of file |
