diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-07-15 23:29:36 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-07-15 23:29:36 -0700 |
commit | f2bd0ec7bb7cd8abf351868929261026429c383a (patch) | |
tree | c5d9635a77d4c18042e0e8d8499732ba3bf4c6b6 /ext/bg/js/options-form.js | |
parent | 361dd47f0abab271f8ae3bf4ce2cdcc3b0b91c99 (diff) |
Add option to enable and disable audio playback
Diffstat (limited to 'ext/bg/js/options-form.js')
-rw-r--r-- | ext/bg/js/options-form.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index 5a5e8834..712b7243 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -40,11 +40,12 @@ function formToOptions(section, callback) { switch (section) { case 'general': - optsNew.scanLength = parseInt($('#scan-length').val()); - optsNew.activateOnStartup = $('#activate-on-startup').prop('checked'); - optsNew.loadEnamDict = $('#load-enamdict').prop('checked'); - optsNew.selectMatchedText = $('#select-matched-text').prop('checked'); - optsNew.enableAnkiConnect = $('#enable-anki-connect').prop('checked'); + optsNew.scanLength = parseInt($('#scan-length').val()); + optsNew.activateOnStartup = $('#activate-on-startup').prop('checked'); + optsNew.loadEnamDict = $('#load-enamdict').prop('checked'); + optsNew.selectMatchedText = $('#select-matched-text').prop('checked'); + optsNew.enableAudioPlayback = $('#enable-audio-playback').prop('checked'); + optsNew.enableAnkiConnect = $('#enable-anki-connect').prop('checked'); break; case 'anki': optsNew.ankiCardTags = $('#anki-card-tags').val().split(/[,; ]+/); @@ -169,6 +170,7 @@ $(document).ready(() => { $('#activate-on-startup').prop('checked', opts.activateOnStartup); $('#load-enamdict').prop('checked', opts.loadEnamDict); $('#select-matched-text').prop('checked', opts.selectMatchedText); + $('#enable-audio-playback').prop('checked', opts.enableAudioPlayback); $('#enable-anki-connect').prop('checked', opts.enableAnkiConnect); $('#anki-card-tags').val(opts.ankiCardTags.join(' ')); |