diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-05-04 19:31:06 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-05-04 19:31:06 -0700 |
commit | 320d9bca0e2f4e4a66e58672898722dfeb28f7d4 (patch) | |
tree | efa32295f2d6411d4d8af68f9c19a7d7cad06437 /ext/fg | |
parent | 22ff1f869537b4ffb3c12ed9d1f101629e06e35a (diff) |
Adding indices
Diffstat (limited to 'ext/fg')
-rw-r--r-- | ext/fg/js/client.js | 12 |
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) { |