From 573b4bc2e82145d0c092daf964711a062d8fba9d Mon Sep 17 00:00:00 2001 From: sD Date: Mon, 13 Jul 2020 18:37:36 +0200 Subject: remember the cookie --- webAO/client.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index 938c566..4f3d4fc 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -418,6 +418,8 @@ class Client extends EventEmitter { changeSFXVolume(); document.getElementById("client_shoutaudio").volume = getCookie("shoutVolume") || 1; changeShoutVolume(); + document.getElementById("client_testimonyaudio").volume = getCookie("testimonyVolume") || 1; + changeTestimonyVolume(); document.getElementById("client_bvolume").value = getCookie("blipVolume") || 1; changeBlipVolume(); @@ -2182,6 +2184,14 @@ export function changeShoutVolume() { } window.changeShoutVolume = changeShoutVolume; +/** + * Triggered by the testimony volume slider. + */ +export function changeTestimonyVolume() { + setCookie("testimonyVolume", document.getElementById("client_testimonyaudio").volume); +} +window.changeTestimonyVolume = changeTestimonyVolume; + /** * Triggered by the blip volume slider. */ -- cgit