From e6867c3976890836ce2fd30fec81b84715415bc2 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Sat, 22 Apr 2023 17:36:23 +0300 Subject: [PATCH 1/2] Fix clicking on form send buttons --- public/scripts/extensions/elevenlabstts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/extensions/elevenlabstts/index.js b/public/scripts/extensions/elevenlabstts/index.js index 9643142dc..fb58215ac 100644 --- a/public/scripts/extensions/elevenlabstts/index.js +++ b/public/scripts/extensions/elevenlabstts/index.js @@ -452,7 +452,7 @@ function onAudioControlClicked() { function addAudioControl() { $('#send_but_sheld').prepend('
') - $('#send_but_sheld').on('click', onAudioControlClicked) + $('#tts_media_control').on('click', onAudioControlClicked) audioControl = document.getElementById('tts_media_control'); updateUiAudioPlayState(); } From e4f8aa310d376aa4715f9f26148fd0b74b69fd19 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Sat, 22 Apr 2023 17:37:32 +0300 Subject: [PATCH 2/2] Check for swipes before trying to record --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 511af7cfe..2bef5c553 100644 --- a/public/script.js +++ b/public/script.js @@ -1260,7 +1260,7 @@ class StreamingProcessor { setFirstSwipe(messageId) { if (this.type !== 'swipe' && this.type !== 'impersonate') { - if (chat[messageId]['swipes'].length === 1 && chat[messageId]['swipe_id'] === 0) { + if (Array.isArray(chat[messageId]['swipes']) && chat[messageId]['swipes'].length === 1 && chat[messageId]['swipe_id'] === 0) { chat[messageId]['swipes'][0] = chat[messageId]['mes']; } }