Bläddra i källkod

Optionnaly force new browser tab

Frederic Collonval 5 år sedan
förälder
incheckning
9b78e46218
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      packages/help-extension/src/index.tsx

+ 5 - 1
packages/help-extension/src/index.tsx

@@ -361,9 +361,13 @@ function activate(
     execute: args => {
       const url = args['url'] as string;
       const text = args['text'] as string;
+      const newBrowserTab = (args['newBrowserTab'] as boolean) || false;
 
       // If help resource will generate a mixed content error, load externally.
-      if (LAB_IS_SECURE && URLExt.parse(url).protocol !== 'https:') {
+      if (
+        newBrowserTab ||
+        (LAB_IS_SECURE && URLExt.parse(url).protocol !== 'https:')
+      ) {
         window.open(url);
         return;
       }