aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-02 22:17:45 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-02 22:17:45 -0500
commit5339381c30316c49e971fa5ba4ef2050ed96f96f (patch)
tree972d9d4b0dcb9df7aa118e985bc1b14716c19680 /ext/bg/js/settings/main.js
parentf89806e05d9db2924ee5bc80c6f640914d8ae2e5 (diff)
Update how anki data is updated
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);