From 67314a8bc22ea198b8e3de788282a0ca0151cb1e Mon Sep 17 00:00:00 2001 From: Caleb Date: Sun, 4 Sep 2022 00:02:19 -0400 Subject: Several functions moved --- webAO/dom/onOOCEnter.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 webAO/dom/onOOCEnter.ts (limited to 'webAO/dom/onOOCEnter.ts') 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( + (document.getElementById("client_oocinputbox")).value + ); + (document.getElementById("client_oocinputbox")).value = + ""; + } + } + window.onOOCEnter = onOOCEnter; + \ No newline at end of file -- cgit