Adrià Vilanova MartÃnez | 5f5b3e0 | 2023-07-23 00:08:17 +0200 | [diff] [blame] | 1 | import {injectScript} from '../../../common/contentScriptsUtils.js'; |
| 2 | import MWI18nServer from '../../../common/mainWorldI18n/Server.js'; |
| 3 | |
| 4 | import UpdateBanner from './banner/index.js'; |
| 5 | |
| 6 | export default class UpdateHandler { |
| 7 | constructor() { |
| 8 | new MWI18nServer(); |
| 9 | injectScript(chrome.runtime.getURL('updateHandlerLitComponents.bundle.js')); |
| 10 | this.updateBanner = new UpdateBanner(); |
| 11 | } |
| 12 | |
| 13 | handle(reason) { |
| 14 | console.debug(`Handling extension update (reason: ${reason}).`); |
| 15 | this.updateBanner.addBanner(reason); |
| 16 | } |
| 17 | } |