aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/changeVolume.js
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-11 12:53:53 +0100
committerstonedDiscord <Tukz@gmx.de>2022-03-11 12:53:53 +0100
commita8e26dce73b694aeeefc0be52147a36ced5975c9 (patch)
tree9a2d94a2d7924ca508087233198bc6ba83fc4395 /webAO/dom/changeVolume.js
parent4b918084e413933cfc819bd1a1246c6a1ac13e31 (diff)
move volume into 1 file
Diffstat (limited to 'webAO/dom/changeVolume.js')
-rw-r--r--webAO/dom/changeVolume.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/webAO/dom/changeVolume.js b/webAO/dom/changeVolume.js
new file mode 100644
index 0000000..4ef3027
--- /dev/null
+++ b/webAO/dom/changeVolume.js
@@ -0,0 +1,19 @@
+import setCookie from '../utils/setCookie';
+
+/**
+ * Triggered by the sound effect volume slider.
+ */
+
+export function changeSFXVolume() {
+ setCookie('sfxVolume', document.getElementById('client_sfxaudio').volume);
+}
+window.changeSFXVolume = changeSFXVolume;
+
+/**
+ * Triggered by the shout volume slider.
+ */
+
+export function changeShoutVolume() {
+ setCookie('shoutVolume', document.getElementById('client_shoutaudio').volume);
+}
+window.changeShoutVolume = changeShoutVolume;