diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-02-08 20:13:45 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-02-08 20:13:45 -0800 |
commit | 2e3aec9ba11b15d7ac2b5d99af2dacac88e9c276 (patch) | |
tree | 20b47cc94b727e88dd077c29940b89a707265155 /ext/fg/js/driver.js | |
parent | f3fe0994f52067d7c6d1886b02afd8f0a2a15099 (diff) |
fix "url" not being set on kanji cards, add more fields
Diffstat (limited to 'ext/fg/js/driver.js')
-rw-r--r-- | ext/fg/js/driver.js | 6 |
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); |