summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-31 22:55:03 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-31 22:55:03 +0200
commit8a2642a51c163fdf45c0fe5236efae51a5b68b81 (patch)
treeb93cc8377d784d5c8211d3f48b372dd6c999c536 /src
parente9b18ccf98b7ccfb7ef466fc44bb90c1a85d423a (diff)
downloadwallet-core-8a2642a51c163fdf45c0fe5236efae51a5b68b81.tar.gz
wallet-core-8a2642a51c163fdf45c0fe5236efae51a5b68b81.tar.bz2
wallet-core-8a2642a51c163fdf45c0fe5236efae51a5b68b81.zip
version, apply updates ASAP
Diffstat (limited to 'src')
-rw-r--r--src/webex/wxBackend.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 356b2af6e..5290b4c17 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -428,6 +428,13 @@ function clearRateLimitCache() {
* Sets up all event handlers and other machinery.
*/
export async function wxMain() {
+ // Explicitly unload the extension page as soon as an update is available,
+ // so the update gets installed as soon as possible.
+ chrome.runtime.onUpdateAvailable.addListener((details) => {
+ console.log("update available:", details);
+ chrome.runtime.reload();
+ })
+
window.onerror = (m, source, lineno, colno, error) => {
logging.record("error", m + error, undefined, source || "(unknown)", lineno || 0, colno || 0);
};