blob: 8eaa8157cfb28981ed9b643cf672f3f9ce1a8115 [file] [log] [blame]
Adrià Vilanova Martínez5f5b3e02023-07-23 00:08:17 +02001import {injectScript} from '../../../common/contentScriptsUtils.js';
2import MWI18nServer from '../../../common/mainWorldI18n/Server.js';
3
4import UpdateBanner from './banner/index.js';
5
6export 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}