diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-11 21:15:51 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-11 21:15:51 -0500 |
commit | 7446c99f984ea84831b9e7f0a11b9a60581be563 (patch) | |
tree | d483045845765a35548e1619eb1f2da43fb2cb69 | |
parent | 47feb95842eac8e2fb4571a5ec493454cc0c422e (diff) |
Fix Text-to-speech voice dropdown being reset
-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; +} |