Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <HTML>
  2.  
  3. <HEAD>
  4. <TITLE>App Example Page</TITLE>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <style>
  9. html, body { width: 100%; height: 100%; margin: 0; }
  10. </style>
  11. </HEAD>
  12.  
  13. <BODY>
  14. <CENTER>
  15. <H1>App</H1>
  16. </CENTER>
  17. <div id="elementid"></div>
  18. <script src="https://unpkg.com/blip-chat-web" type="text/javascript"></script>
  19. <script>
  20.  
  21. (function () {
  22.  
  23. window.onload = function () {
  24.  
  25. function uuidv4() {
  26. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  27. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  28. return v.toString(16);
  29. });
  30. }
  31.  
  32. var uniqueid = uuidv4();
  33.  
  34. var client = new BlipWebSDK.ChatBuilder();
  35.  
  36. window.client = client;
  37. var options = {
  38. config: {
  39. authType: BlipWebSDK.AuthType.DEV,
  40.  
  41. // This parameter should be used only on DEV auth type
  42. user: {
  43. id: uniqueid, // Required
  44. password: uniqueid, // Required
  45. name: 'Usuário(a)' // Optional
  46. },
  47.  
  48. },
  49. window: {
  50. title: 'Fale com a gente aqui',
  51. target: 'elementid',
  52. hideMenu: false,
  53. iconPath: 'http://0mn.io/Content/ip70v'
  54. }
  55. };
  56.  
  57. client.withApiKey('')
  58. .build(options);
  59.  
  60. }
  61. })();
  62.  
  63.  
  64. </script>
  65.  
  66. </BODY>
  67.  
  68. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement