diff options
Diffstat (limited to 'ext/bg/js/settings/audio.js')
-rw-r--r-- | ext/bg/js/settings/audio.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/settings/audio.js b/ext/bg/js/settings/audio.js index 2ac4590b..b6ad12ba 100644 --- a/ext/bg/js/settings/audio.js +++ b/ext/bg/js/settings/audio.js @@ -38,6 +38,7 @@ function textToSpeechInitialize() { speechSynthesis.addEventListener('voiceschanged', () => updateTextToSpeechVoices(), false); updateTextToSpeechVoices(); + document.querySelector('#text-to-speech-voice').addEventListener('change', (e) => onTextToSpeechVoiceChange(e), false); document.querySelector('#text-to-speech-voice-test').addEventListener('click', () => textToSpeechTest(), false); } @@ -111,3 +112,7 @@ function textToSpeechTest() { // NOP } } + +function onTextToSpeechVoiceChange(e) { + e.currentTarget.dataset.value = e.currentTarget.value; +} |