28823_chatbot_vuzo_link
Showing
1 changed file
with
4 additions
and
18 deletions
| ... | @@ -31,6 +31,10 @@ | ... | @@ -31,6 +31,10 @@ |
| 31 | let btutilAsset = document.createElement('script'); | 31 | let btutilAsset = document.createElement('script'); |
| 32 | btutilAsset.setAttribute('src', "%REACT_APP_BTUTIL_ASSET_URL%" + ver); | 32 | btutilAsset.setAttribute('src', "%REACT_APP_BTUTIL_ASSET_URL%" + ver); |
| 33 | document.head.appendChild(btutilAsset); | 33 | document.head.appendChild(btutilAsset); |
| 34 | |||
| 35 | let vuzoScript = document.createElement("script") | ||
| 36 | vuzoScript.setAttribute("src", "%REACT_APP_START_SERVER_URL%" + ver); | ||
| 37 | document.head.appendChild(vuzoScript); | ||
| 34 | </script> | 38 | </script> |
| 35 | </head> | 39 | </head> |
| 36 | <body> | 40 | <body> |
| ... | @@ -48,24 +52,6 @@ | ... | @@ -48,24 +52,6 @@ |
| 48 | --> | 52 | --> |
| 49 | </body> | 53 | </body> |
| 50 | <script> | 54 | <script> |
| 51 | const hostname = window.location.hostname; | ||
| 52 | const segments = hostname.split('.'); | ||
| 53 | const firstSegment = segments[0]; | ||
| 54 | let server = ''; | ||
| 55 | |||
| 56 | if(firstSegment === 'dev'){ | ||
| 57 | server = '//dev.' | ||
| 58 | } else if (firstSegment === 'staging'){ | ||
| 59 | server = '//staging.' | ||
| 60 | } else { | ||
| 61 | server = '//' | ||
| 62 | } | ||
| 63 | |||
| 64 | var script = document.createElement("script") | ||
| 65 | script.setAttribute("src", server + `start.ai-pro.org/snippets/com.global.vuzo.js`) | ||
| 66 | document.head.appendChild(script) | ||
| 67 | </script> | ||
| 68 | <script> | ||
| 69 | window.onload = function() { | 55 | window.onload = function() { |
| 70 | displayVuzo(); | 56 | displayVuzo(); |
| 71 | displayGooglePlay(); | 57 | displayGooglePlay(); | ... | ... |
-
Please register or sign in to post a comment