blob: 48d0ce1326c6050d7bb23132589f9e2153e0e70d [file] [log] [blame]
import {injectScript} from '../../../common/contentScriptsUtils';
import MWI18nServer from '../../../common/mainWorldI18n/Server.js';
import UpdateBanner from './banner/index.js';
export default class UpdateHandler {
constructor() {
// The extension was just updated, so we need to start everything from
// scratch.
new MWI18nServer();
injectScript(chrome.runtime.getURL('updateHandlerLitComponents.bundle.js'));
this.updateBanner = new UpdateBanner();
}
handle(reason) {
console.debug(`Handling extension update (reason: ${reason}).`);
this.updateBanner.addBanner(reason);
}
}