Fix Text-to-speech voice dropdown being reset
This commit is contained in:
parent
47feb95842
commit
7446c99f98
@ -38,6 +38,7 @@ function textToSpeechInitialize() {
|
|||||||
speechSynthesis.addEventListener('voiceschanged', () => updateTextToSpeechVoices(), false);
|
speechSynthesis.addEventListener('voiceschanged', () => updateTextToSpeechVoices(), false);
|
||||||
updateTextToSpeechVoices();
|
updateTextToSpeechVoices();
|
||||||
|
|
||||||
|
document.querySelector('#text-to-speech-voice').addEventListener('change', (e) => onTextToSpeechVoiceChange(e), false);
|
||||||
document.querySelector('#text-to-speech-voice-test').addEventListener('click', () => textToSpeechTest(), false);
|
document.querySelector('#text-to-speech-voice-test').addEventListener('click', () => textToSpeechTest(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,3 +112,7 @@ function textToSpeechTest() {
|
|||||||
// NOP
|
// NOP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onTextToSpeechVoiceChange(e) {
|
||||||
|
e.currentTarget.dataset.value = e.currentTarget.value;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user