summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-04-08 18:01:36 -0700
committerAlex Yatskov <alex@foosoft.net>2017-04-08 18:01:36 -0700
commitd263a93d446096abfc33e47f591dbb71eb7fe928 (patch)
treee01643ee126dce24b0f8baae00a40b01e50dbf94 /ext/bg/js/yomichan.js
parenta551b0d462585e7420153c266435b214f134617f (diff)
usage guide
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index feb74b6e..51e05c80 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -28,8 +28,8 @@ window.yomichan = new class {
this.translator.prepare().then(optionsLoad).then(this.optionsSet.bind(this)).then(() => {
chrome.commands.onCommand.addListener(this.onCommand.bind(this));
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
- if (chrome.runtime.onInstalled) {
- chrome.runtime.onInstalled.addListener(this.onInstalled.bind(this));
+ if (this.options.general.showGuide) {
+ chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')});
}
});
}
@@ -157,12 +157,6 @@ window.yomichan = new class {
return Promise.resolve(handlebarsRender(template, data));
}
- onInstalled(details) {
- if (details.reason === 'install') {
- chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')});
- }
- }
-
onCommand(command) {
const handlers = {
search: () => {