From a6c8d0787af81259e2fe5e95e8eb90e0e3fb6303 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Wed, 17 Jun 2015 10:11:30 +0200 Subject: [PATCH] Does not reload the page after Chrome desktop sharing extension is installed. --- index.html | 2 +- libs/app.bundle.js | 8 +++++--- modules/desktopsharing/desktopsharing.js | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index b9a1149f1..d590d5c23 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ - + diff --git a/libs/app.bundle.js b/libs/app.bundle.js index 720a62f81..e5baf5908 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -9993,9 +9993,11 @@ function obtainScreenFromExtension(streamCallback, failCallback) { getWebStoreInstallUrl(), function (arg) { console.log("Extension installed successfully", arg); - // We need to reload the page in order to get the access to - // chrome.runtime - window.location.reload(false); + extInstalled = true; + // We need to give a moment for the endpoint to become available + window.setTimeout(function () { + doGetStreamFromExtension(streamCallback, failCallback); + }, 500); }, function (arg) { console.log("Failed to install the extension", arg); diff --git a/modules/desktopsharing/desktopsharing.js b/modules/desktopsharing/desktopsharing.js index 361cf001d..83dfd073d 100644 --- a/modules/desktopsharing/desktopsharing.js +++ b/modules/desktopsharing/desktopsharing.js @@ -188,9 +188,11 @@ function obtainScreenFromExtension(streamCallback, failCallback) { getWebStoreInstallUrl(), function (arg) { console.log("Extension installed successfully", arg); - // We need to reload the page in order to get the access to - // chrome.runtime - window.location.reload(false); + extInstalled = true; + // We need to give a moment for the endpoint to become available + window.setTimeout(function () { + doGetStreamFromExtension(streamCallback, failCallback); + }, 500); }, function (arg) { console.log("Failed to install the extension", arg);