From 8614c7a516b475803b0ad30a0fe8e6d0c98e7b48 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 25 Feb 2019 21:46:33 +0900 Subject: Show popup when installed or updated --- src/background/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/background') 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(); }); -- cgit v1.2.3