.
This commit is contained in:
parent
c3ead3af93
commit
3608c9c16e
@ -229,12 +229,12 @@ function onAnkiModelChanged(e) {
|
||||
|
||||
$(document).ready(() => {
|
||||
loadOptions().then(opts => {
|
||||
$('#scan-length').val(opts.scanLength);
|
||||
$('#activate-on-startup').prop('checked', opts.activateOnStartup);
|
||||
$('#select-matched-text').prop('checked', opts.selectMatchedText);
|
||||
$('#show-advanced-options').prop('checked', opts.showAdvancedOptions);
|
||||
$('#enable-audio-playback').prop('checked', opts.enableAudioPlayback);
|
||||
$('#enable-anki-connect').prop('checked', opts.enableAnkiConnect);
|
||||
$('#show-advanced-options').prop('checked', opts.showAdvancedOptions);
|
||||
$('#scan-length').val(opts.scanLength);
|
||||
|
||||
$('#anki-card-tags').val(opts.ankiCardTags.join(' '));
|
||||
$('#sentence-extent').val(opts.sentenceExtent);
|
||||
|
@ -19,14 +19,16 @@
|
||||
|
||||
function sanitizeOptions(options) {
|
||||
const defaults = {
|
||||
scanLength: 20,
|
||||
activateOnStartup: false,
|
||||
selectMatchedText: true,
|
||||
showAdvancedOptions: false,
|
||||
enableAudioPlayback: true,
|
||||
enableAnkiConnect: false,
|
||||
showAdvancedOptions: false,
|
||||
scanLength: 20,
|
||||
|
||||
ankiCardTags: ['yomichan'],
|
||||
sentenceExtent: 200,
|
||||
|
||||
ankiTermDeck: '',
|
||||
ankiTermModel: '',
|
||||
ankiTermFields: {},
|
||||
|
Loading…
Reference in New Issue
Block a user