diff options
Diffstat (limited to 'src/background/index.ts')
-rw-r--r-- | src/background/index.ts | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/background/index.ts b/src/background/index.ts index f9efd4d..26b0f6b 100644 --- a/src/background/index.ts +++ b/src/background/index.ts @@ -1,23 +1,6 @@ -import ContentMessageListener from './infrastructures/ContentMessageListener'; -import SettingController from './controllers/SettingController'; -import VersionController from './controllers/VersionController'; +import 'reflect-metadata'; +import { container } from 'tsyringe'; +import Application from './Application'; -let settingController = new SettingController(); -settingController.reload(); - -browser.runtime.onInstalled.addListener((details) => { - if (details.reason !== 'install' && details.reason !== 'update') { - return; - } - new VersionController().notify(); -}); - -new ContentMessageListener().run(); -browser.storage.onChanged.addListener((changes, area) => { - if (area !== 'local') { - return; - } - if (changes.settings) { - settingController.reload(); - } -}); +let app = container.resolve(Application); +app.run(); |