aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-15 17:30:43 -0500
committerGitHub <noreply@github.com>2021-01-15 17:30:43 -0500
commit9f202313c744412c984c136937976bbdf46faaef (patch)
treea554db0c2675d4e178c7cb58d20c255fbec42972 /ext/bg/js/settings
parent1dcfbf6ba6516d05f756d26bf84049d94776ab14 (diff)
Fix note context on settings page (#1241)
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r--ext/bg/js/settings/anki-templates-controller.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/settings/anki-templates-controller.js b/ext/bg/js/settings/anki-templates-controller.js
index dd07c391..6bd1bad7 100644
--- a/ext/bg/js/settings/anki-templates-controller.js
+++ b/ext/bg/js/settings/anki-templates-controller.js
@@ -173,9 +173,9 @@ class AnkiTemplatesController {
if (definition !== null) {
const options = await this._settingsController.getOptions();
const context = {
- document: {
- title: document.title
- }
+ url: window.location.href,
+ sentence: {text: definition.rawSource, offset: 0},
+ documentTitle: document.title
};
let templates = options.anki.fieldTemplates;
if (typeof templates !== 'string') { templates = this._defaultFieldTemplates; }