aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/main.js')
-rw-r--r--ext/bg/js/settings/main.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index 82d75d8b..7456e7a4 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -80,10 +80,10 @@ async function formRead(options) {
if (optionsAnkiEnableOld && !ankiErrorShown()) {
options.anki.terms.deck = $('#anki-terms-deck').val();
options.anki.terms.model = $('#anki-terms-model').val();
- options.anki.terms.fields = utilBackgroundIsolate(ankiFieldsToDict($('#terms .anki-field-value')));
+ options.anki.terms.fields = utilBackgroundIsolate(ankiFieldsToDict(document.querySelectorAll('#terms .anki-field-value')));
options.anki.kanji.deck = $('#anki-kanji-deck').val();
options.anki.kanji.model = $('#anki-kanji-model').val();
- options.anki.kanji.fields = utilBackgroundIsolate(ankiFieldsToDict($('#kanji .anki-field-value')));
+ options.anki.kanji.fields = utilBackgroundIsolate(ankiFieldsToDict(document.querySelectorAll('#kanji .anki-field-value')));
}
}
@@ -167,11 +167,7 @@ function formUpdateVisibility(options) {
}
}
-async function onFormOptionsChanged(e) {
- if (!e.originalEvent && !e.isTrigger) {
- return;
- }
-
+async function onFormOptionsChanged() {
const optionsContext = getOptionsContext();
const options = await apiOptionsGet(optionsContext);