From 7446c99f984ea84831b9e7f0a11b9a60581be563 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 11 Dec 2019 21:15:51 -0500 Subject: Fix Text-to-speech voice dropdown being reset --- ext/bg/js/settings/audio.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ext/bg/js') 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; +} -- cgit v1.2.3