aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-09-12 19:47:37 -0700
committerGitHub <noreply@github.com>2019-09-12 19:47:37 -0700
commit1fea1184bd66ed250f8bed8218c08498a7ea81c0 (patch)
tree8374573a36784ce12abb7b490ccd9791aea3f2e3 /ext/mixed
parentcc53510883b5c5f75069655df6a6733ff1bd002a (diff)
parent84bd9ff93b15f419ce1076b7545aeb406917f9b5 (diff)
Merge pull request #205 from toasted-nutbread/settings-improvements2
Settings improvements part 2
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/display.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index ebf56897..eca67b5e 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -27,6 +27,7 @@ class Display {
this.sequence = 0;
this.index = 0;
this.audioCache = {};
+ this.optionsContext = {};
this.dependencies = {};
@@ -66,7 +67,7 @@ class Display {
context.source.source = this.context.source;
}
- const kanjiDefs = await apiKanjiFind(link.text());
+ const kanjiDefs = await apiKanjiFind(link.text(), this.optionsContext);
this.kanjiShow(kanjiDefs, this.options, context);
} catch (e) {
this.onError(e);
@@ -89,7 +90,7 @@ class Display {
try {
textSource.setEndOffset(this.options.scanning.length);
- ({definitions, length} = await apiTermsFind(textSource.text()));
+ ({definitions, length} = await apiTermsFind(textSource.text(), this.optionsContext));
if (definitions.length === 0) {
return false;
}
@@ -379,7 +380,7 @@ class Display {
async adderButtonUpdate(modes, sequence) {
try {
- const states = await apiDefinitionsAddable(this.definitions, modes);
+ const states = await apiDefinitionsAddable(this.definitions, modes, this.optionsContext);
if (!states || sequence !== this.sequence) {
return;
}
@@ -453,7 +454,7 @@ class Display {
}
}
- const noteId = await apiDefinitionAdd(definition, mode, context);
+ const noteId = await apiDefinitionAdd(definition, mode, context, this.optionsContext);
if (noteId) {
const index = this.definitions.indexOf(definition);
Display.adderButtonFind(index, mode).addClass('disabled');