b7c70c79 by RSA

28823_chatbot_vuzo_link

1 parent ba0e8abc
...@@ -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>
...@@ -47,24 +51,6 @@ ...@@ -47,24 +51,6 @@
47 To create a production bundle, use `npm run build` or `yarn build`. 51 To create a production bundle, use `npm run build` or `yarn build`.
48 --> 52 -->
49 </body> 53 </body>
50 <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> 54 <script>
69 window.onload = function() { 55 window.onload = function() {
70 displayVuzo(); 56 displayVuzo();
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!