diff options
Diffstat (limited to 'src/background/index.js')
-rw-r--r-- | src/background/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/background/index.js b/src/background/index.js index b829f99..29aa92b 100644 --- a/src/background/index.js +++ b/src/background/index.js @@ -3,6 +3,12 @@ import SettingController from './controllers/SettingController'; import VersionController from './controllers/VersionController'; new SettingController().reload(); -new VersionController().notifyIfUpdated(); + +browser.runtime.onInstalled.addListener((details) => { + if (details.reason !== 'install' && details.reason !== 'update') { + return; + } + new VersionController().notify(); +}); new ContentMessageListener().run(); |