aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/driver.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/driver.js')
-rw-r--r--ext/fg/js/driver.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js
index 7facda0a..cb7f2ea6 100644
--- a/ext/fg/js/driver.js
+++ b/ext/fg/js/driver.js
@@ -167,7 +167,11 @@ class Driver {
if (definitions.length === 0) {
return false;
} else {
- definitions.forEach(definition => definition.url = window.location.href);
+ const sentence = extractSentence(textSource, this.options.anki.sentenceExt);
+ definitions.forEach(definition => {
+ definition.url = window.location.href;
+ definition.sentence = sentence;
+ });
this.popup.showNextTo(textSource.getRect());
this.popup.showKanjiDefs(definitions, this.options);