Przeglądaj źródła

Does not reload the page after Chrome desktop sharing extension is installed.

j8
paweldomas 10 lat temu
rodzic
commit
a6c8d0787a
3 zmienionych plików z 11 dodań i 7 usunięć
  1. 1
    1
      index.html
  2. 5
    3
      libs/app.bundle.js
  3. 5
    3
      modules/desktopsharing/desktopsharing.js

+ 1
- 1
index.html Wyświetl plik

@@ -19,7 +19,7 @@
19 19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20 20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21 21
     <script src="interface_config.js?v=5"></script>
22
-    <script src="libs/app.bundle.js?v=85"></script>
22
+    <script src="libs/app.bundle.js?v=86"></script>
23 23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24 24
     <link rel="stylesheet" href="css/font.css?v=7"/>
25 25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 5
- 3
libs/app.bundle.js Wyświetl plik

@@ -9993,9 +9993,11 @@ function obtainScreenFromExtension(streamCallback, failCallback) {
9993 9993
             getWebStoreInstallUrl(),
9994 9994
             function (arg) {
9995 9995
                 console.log("Extension installed successfully", arg);
9996
-                // We need to reload the page in order to get the access to
9997
-                // chrome.runtime
9998
-                window.location.reload(false);
9996
+                extInstalled = true;
9997
+                // We need to give a moment for the endpoint to become available
9998
+                window.setTimeout(function () {
9999
+                    doGetStreamFromExtension(streamCallback, failCallback);
10000
+                }, 500);
9999 10001
             },
10000 10002
             function (arg) {
10001 10003
                 console.log("Failed to install the extension", arg);

+ 5
- 3
modules/desktopsharing/desktopsharing.js Wyświetl plik

@@ -188,9 +188,11 @@ function obtainScreenFromExtension(streamCallback, failCallback) {
188 188
             getWebStoreInstallUrl(),
189 189
             function (arg) {
190 190
                 console.log("Extension installed successfully", arg);
191
-                // We need to reload the page in order to get the access to
192
-                // chrome.runtime
193
-                window.location.reload(false);
191
+                extInstalled = true;
192
+                // We need to give a moment for the endpoint to become available
193
+                window.setTimeout(function () {
194
+                    doGetStreamFromExtension(streamCallback, failCallback);
195
+                }, 500);
194 196
             },
195 197
             function (arg) {
196 198
                 console.log("Failed to install the extension", arg);

Ładowanie…
Anuluj
Zapisz