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.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: () => {