aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-07-14 19:01:04 +0200
committersD <stoned@derpymail.org>2020-07-14 19:01:04 +0200
commit71e3a749d7a8de9c982e670f88eb2c08d3091565 (patch)
treeff72ac97dedeaa337d6bc70830c7eb4995535aa8 /webAO
parentdefaf5b6511588d3a00809979c9e0cf3ffd0766e (diff)
add a callword array and fill it when it's changed
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.html2
-rw-r--r--webAO/client.js10
2 files changed, 11 insertions, 1 deletions
diff --git a/webAO/client.html b/webAO/client.html
index befeb25..f6b3971 100644
--- a/webAO/client.html
+++ b/webAO/client.html
@@ -402,7 +402,7 @@
<br>
<br>
<textarea id="client_callwords" name="client_callwords" rows="4" cols="10"
- placeholder="Put 1 callword per line here"></textarea>
+ placeholder="Put 1 callword per line here" onchange="changeCallwords()"></textarea>
<br>
<br>
<span style="color:red">&#8595; Only touch these settings if you know what you are doing. &#8595;</span>
diff --git a/webAO/client.js b/webAO/client.js
index 938c566..d4b6bc9 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -121,6 +121,8 @@ class Client extends EventEmitter {
this.areas = [];
this.musics = [];
+ this.callwords = [];
+
this.resources = {
"holdit": {
"src": AO_HOST + "misc/default/holdit_bubble.png",
@@ -2202,6 +2204,14 @@ export function reloadTheme() {
window.reloadTheme = reloadTheme;
/**
+ * Triggered by a changed callword list
+ */
+export function changeCallwords() {
+ client.callwords = document.getElementById("client_callwords").value.split('\n');
+}
+window.changeCallwords = changeCallwords;
+
+/**
* Triggered by the modcall sfx dropdown
*/
export function modcall_test() {