aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-16 21:36:10 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-17 18:40:43 -0400
commit598cd32946c8e10e5aa3fcec26e3fc40af44bddf (patch)
treecd030ed1d5f60aaba15c3a1c2bec284154bfc038 /ext/fg/js/frontend.js
parent779b4af590b7a9030de9da1005bb3d8f79c3c5d0 (diff)
Update *show* APIs to unified showContent and setContent
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 7ea737d7..eddbf9cc 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -332,9 +332,10 @@ class Frontend {
} catch (e) {
if (window.yomichan_orphaned) {
if (textSource && this.options.scanning.modifier !== 'none') {
- this.lastShowPromise = this.popup.showOrphaned(
+ this.lastShowPromise = this.popup.showContent(
textSource.getRect(),
- textSource.getWritingMode()
+ textSource.getWritingMode(),
+ 'orphaned'
);
}
} else {
@@ -370,11 +371,11 @@ class Frontend {
const sentence = docSentenceExtract(textSource, this.options.anki.sentenceExt);
const url = window.location.href;
- this.lastShowPromise = this.popup.termsShow(
+ this.lastShowPromise = this.popup.showContent(
textSource.getRect(),
textSource.getWritingMode(),
- definitions,
- {sentence, url, focus}
+ 'terms',
+ {definitions, context: {sentence, url, focus}}
);
this.textSourceLast = textSource;
@@ -400,11 +401,11 @@ class Frontend {
const sentence = docSentenceExtract(textSource, this.options.anki.sentenceExt);
const url = window.location.href;
- this.lastShowPromise = this.popup.kanjiShow(
+ this.lastShowPromise = this.popup.showContent(
textSource.getRect(),
textSource.getWritingMode(),
- definitions,
- {sentence, url, focus}
+ 'kanji',
+ {definitions, context: {sentence, url, focus}}
);
this.textSourceLast = textSource;