summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js5
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')});
}