From aff3ec5be0867639ac2f73d4faf05d0461bb4f5a Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Tue, 9 Apr 2024 20:19:46 +0200 Subject: Improve styling mobile --- g4f/gui/client/static/js/chat.v1.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'g4f/gui/client/static/js') diff --git a/g4f/gui/client/static/js/chat.v1.js b/g4f/gui/client/static/js/chat.v1.js index 02437bf7..5036a93b 100644 --- a/g4f/gui/client/static/js/chat.v1.js +++ b/g4f/gui/client/static/js/chat.v1.js @@ -96,10 +96,12 @@ const register_message_buttons = async () => { el.dataset.click = "true"; el.addEventListener("click", async () => { if ("active" in el.classList || window.doSpeech) { + el.classList.add("blink") stopped = true; return; } if (stopped) { + el.classList.remove("blink") stopped = false; return; } @@ -125,7 +127,7 @@ const register_message_buttons = async () => { sound.controls = 'controls'; sound.src = url; sound.type = 'audio/wav'; - if (ended) { + if (ended && !stopped) { sound.autoplay = true; } sound.onended = function() { -- cgit v1.2.3