aboutsummaryrefslogtreecommitdiff
path: root/src/background
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-02-25 21:46:33 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-02-25 21:52:29 +0900
commit8614c7a516b475803b0ad30a0fe8e6d0c98e7b48 (patch)
tree9e8ffd8209972f839367302d3a4b68051f5c2823 /src/background
parentf961c205a7afbcbfc4cc585fbb0362796043f1a1 (diff)
Show popup when installed or updated
Diffstat (limited to 'src/background')
-rw-r--r--src/background/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/background/index.js b/src/background/index.js
index 3e7492d..29aa92b 100644
--- a/src/background/index.js
+++ b/src/background/index.js
@@ -4,7 +4,10 @@ import VersionController from './controllers/VersionController';
new SettingController().reload();
-browser.runtime.onInstalled.addListener(() => {
+browser.runtime.onInstalled.addListener((details) => {
+ if (details.reason !== 'install' && details.reason !== 'update') {
+ return;
+ }
new VersionController().notify();
});