Open guide on install
This commit is contained in:
parent
4e89d27fda
commit
09afc64928
@ -29,6 +29,7 @@ class Yomichan {
|
||||
|
||||
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
|
||||
chrome.browserAction.onClicked.addListener(this.onBrowserAction.bind(this));
|
||||
chrome.runtime.onInstalled.addListener(this.onInstalled.bind(this));
|
||||
|
||||
loadOptions().then(opts => {
|
||||
this.setOptions(opts);
|
||||
@ -38,6 +39,12 @@ class Yomichan {
|
||||
});
|
||||
}
|
||||
|
||||
onInstalled(details) {
|
||||
if (details.reason === 'install') {
|
||||
chrome.tabs.create({url: chrome.extension.getURL('bg/guide.html')});
|
||||
}
|
||||
}
|
||||
|
||||
onMessage(request, sender, callback) {
|
||||
const {action, params} = request, method = this['api_' + action];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user