From 156ff4e79f5e788a1f81efb13da42de684aaff99 Mon Sep 17 00:00:00 2001 From: Eyal Gruss Date: Sun, 10 Nov 2024 23:10:15 +0200 Subject: [PATCH] try to fix firefox android speech button - take 2 --- resen/kaddish/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resen/kaddish/script.js b/resen/kaddish/script.js index 4428c48..9c8196c 100644 --- a/resen/kaddish/script.js +++ b/resen/kaddish/script.js @@ -82,7 +82,7 @@ play.addEventListener('click', event => { utter.lang = voice.lang } utter.rate = .6 - utter.onend = e => {console.log(e.charIndex, utter.text.length); if (e.charIndex == utter.text.length) play.click()} + utter.onend = e => {if (!e.charLength) play.click()} speechSynthesis.speak(utter) } else speechSynthesis.cancel() }) \ No newline at end of file