aboutsummaryrefslogtreecommitdiff
path: root/ext/js/client.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-06 20:48:36 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-06 20:48:36 -0700
commit7c9d64e95f19528f4618432ff6fa8632e4027b6f (patch)
tree83a371bf4a8f64beef711c23b718bb00ad46b573 /ext/js/client.js
parent721a4dc661fe85768ebdb57b7d4caa5f9c485372 (diff)
Options now work
Diffstat (limited to 'ext/js/client.js')
-rw-r--r--ext/js/client.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/js/client.js b/ext/js/client.js
index 2c513187..3c75068c 100644
--- a/ext/js/client.js
+++ b/ext/js/client.js
@@ -37,7 +37,12 @@ class Client {
window.addEventListener('scroll', (e) => this.hidePopup());
window.addEventListener('resize', (e) => this.hidePopup());
- getState((state) => this.setEnabled(state === 'enabled'));
+ getOptions((opts) => {
+ this.setOptions(opts);
+ getState((state) => {
+ this.setEnabled(state === 'enabled');
+ });
+ });
}
onKeyDown(e) {
@@ -93,7 +98,7 @@ class Client {
this.hidePopup();
} else {
range.setEnd(range.endContainer, range.startOffset + length);
- renderTemplate({defs: results}, 'defs.html', (html) => {
+ renderText({defs: results}, 'defs.html', (html) => {
this.popup.innerHTML = html;
this.showPopup(range);
});