aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/client.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-05-04 19:31:06 -0700
committerAlex Yatskov <alex@foosoft.net>2016-05-04 19:31:06 -0700
commit320d9bca0e2f4e4a66e58672898722dfeb28f7d4 (patch)
treeefa32295f2d6411d4d8af68f9c19a7d7cad06437 /ext/fg/js/client.js
parent22ff1f869537b4ffb3c12ed9d1f101629e06e35a (diff)
Adding indices
Diffstat (limited to 'ext/fg/js/client.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) {