Skip to content

Commit

Permalink
try to fix firefox android speech button - take 6
Browse files Browse the repository at this point in the history
  • Loading branch information
eyaler committed Nov 10, 2024
1 parent f6c51b5 commit ff0e9bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resen/kaddish/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if (!voices.length)
speechSynthesis.addEventListener('voiceschanged', () => voices = speechSynthesis.getVoices())

let cancel
play.addEventListener('click', event => {
play.addEventListener('click', () => {
if (play.classList.toggle('on')) {
const utter = new SpeechSynthesisUtterance([...prefix_chars, ...document.querySelectorAll('svg text:not(:empty):not(.blink)')].map((e, i) => (e.textContent ?? e) + nikud_pisuk[i]).join(''))
console.log(utter.text)
Expand All @@ -87,7 +87,7 @@ play.addEventListener('click', event => {
cancel = false
speechSynthesis.speak(utter)
} else {
cancel = True
cancel = true
speechSynthesis.cancel()
}
})

0 comments on commit ff0e9bb

Please sign in to comment.