aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/client.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index 1cf1cf6f..8495a354 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -26,6 +26,7 @@ class Client {
this.activateBtn = 2;
this.enabled = false;
this.options = {};
+ this.results = null;
this.fgRoot = chrome.extension.getURL('fg');
chrome.runtime.onMessage.addListener(this.onBgMessage.bind(this));
@@ -107,7 +108,10 @@ class Client {
renderText(
{defs: results, root: this.fgRoot, options: this.options},
'term-list.html',
- (content) => this.showPopup(range, content)
+ (content) => {
+ this.results = results;
+ this.showPopup(range, content, results);
+ }
);
}
});
@@ -118,7 +122,10 @@ class Client {
renderText(
{defs: results, root: this.fgRoot, options: this.options},
'kanji-list.html',
- (content) => this.popup.setContent(content)
+ (content) => {
+ this.results = results;
+ this.popup.setContent(content, results);
+ }
);
});
}
@@ -141,6 +148,7 @@ class Client {
}
this.lastRange = null;
+ this.results = null;
}
setEnabled(enabled) {