aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-04-11 21:47:02 +0200
committersD <stoned@derpymail.org>2020-04-11 21:47:02 +0200
commit07cbf4bda7f53ac67119f508c7ebf4e2d572728b (patch)
tree82817da23f0d1b0f0514932f5f43491189fc81a3 /webAO/client.js
parent82428c0ccc7b4938564b434fb0de153afb5af508 (diff)
save showname to a cookie
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/webAO/client.js b/webAO/client.js
index b106b03..90561cc 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1916,6 +1916,15 @@ function setCookie(cname, value) {
}
/**
+ * Triggered when the showname is changed
+ * @param {KeyboardEvent} event
+ */
+export function onShownameChange(event) {
+ setCookie("showname",document.getElementById("client_oocinputbox").value);
+}
+window.onShownameChange = onShownameChange;
+
+/**
* Triggered when the Return key is pressed on the out-of-character chat input box.
* @param {KeyboardEvent} event
*/