diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-07-10 15:20:07 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-07-10 15:20:07 -0700 |
commit | a73b8fbab747fc5d7d2802b88d4007421cda4d87 (patch) | |
tree | 441c0d2972f98080786e6e704c752fda809efb1f /ext/bg/js/yomichan.js | |
parent | 28bc1449d1b2260df2970318982385b0d8456c54 (diff) |
cleanup
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r-- | ext/bg/js/yomichan.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index e0bdabc3..acc560ce 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -25,9 +25,12 @@ window.yomichan = new class { this.anki = new AnkiNull(); this.options = null; - this.translator.prepare().then(optionsLoad).then(this.optionsSet.bind(this)).then(() => { + this.translator.prepare().then(optionsLoad).then(options => { + this.optionsSet(options); + chrome.commands.onCommand.addListener(this.onCommand.bind(this)); chrome.runtime.onMessage.addListener(this.onMessage.bind(this)); + if (this.options.general.showGuide) { chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')}); } |