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