diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-09-28 20:14:21 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-09-28 20:14:21 -0700 |
commit | 004a0d5281fb1793f9106de06fc6758ff97a48fb (patch) | |
tree | 95e6c50e7e83c800341f4878475c180cfb4756f2 /ext/fg/js/driver.js | |
parent | 071902cd057e4828afbc7082271dba1d3ccc1762 (diff) |
Fix activation bug
Diffstat (limited to 'ext/fg/js/driver.js')
-rw-r--r-- | ext/fg/js/driver.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js index 68cbcdee..d0907e7d 100644 --- a/ext/fg/js/driver.js +++ b/ext/fg/js/driver.js @@ -25,7 +25,7 @@ class Driver { this.lastTextSource = null; this.pendingLookup = false; this.enabled = false; - this.options = {}; + this.options = null; this.definitions = null; this.sequence = 0; this.fgRoot = chrome.extension.getURL('fg'); @@ -37,6 +37,13 @@ class Driver { window.addEventListener('keydown', this.onKeyDown.bind(this)); window.addEventListener('scroll', e => this.hidePopup()); window.addEventListener('resize', e => this.hidePopup()); + + getOptions().then(opts => { + this.options = opts; + return getEnabled(); + }).then(enabled => { + this.enabled = enabled; + }); } onKeyDown(e) { |