Prompt users to reload the CC when the extension updates

When the extension updates, it stops working in the Community Console.
Thus, this change adds logic so when the extension detects it has been
recently installed or updated it injects a banner to the top of the CC
with a message which prompts the user to reload the page.

Fixed: twpowertools:82
Change-Id: I0c901c72574c7c64d9ba94f56be96a12f7770049
diff --git a/src/bg.js b/src/bg.js
index 394f0fd..4c3da6f 100644
--- a/src/bg.js
+++ b/src/bg.js
@@ -7,6 +7,7 @@
 import {cleanUpOptions, disableItemsWithMissingPermissions} from './common/optionsUtils.js';
 import KillSwitchMechanism from './killSwitch/index.js';
 import {handleBgOptionChange, handleBgOptionsOnStart} from './options/bgHandler.js';
+import UpdateNotifier from './updateNotifier/index.js';
 
 // #!if browser_target == 'chromium_mv3'
 // XMLHttpRequest is not present in service workers (MV3) and is required by the
@@ -61,7 +62,8 @@
 });
 
 // When the extension is first installed or gets updated, set new options to
-// their default value and update the kill switch status.
+// their default value, update the kill switch status and prompt the user to
+// refresh the Community Console page.
 chrome.runtime.onInstalled.addListener(details => {
   if (details.reason == 'install' || details.reason == 'update') {
     chrome.storage.sync.get(null, options => {
@@ -69,6 +71,9 @@
     });
 
     killSwitchMechanism.updateKillSwitchStatus();
+
+    const updateNotifier = new UpdateNotifier();
+    updateNotifier.notify(details.reason);
   }
 });