aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-11 21:15:51 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-11 21:15:51 -0500
commit7446c99f984ea84831b9e7f0a11b9a60581be563 (patch)
treed483045845765a35548e1619eb1f2da43fb2cb69 /ext/bg/js/settings
parent47feb95842eac8e2fb4571a5ec493454cc0c422e (diff)
Fix Text-to-speech voice dropdown being reset
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r--ext/bg/js/settings/audio.js5
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;
+}