Repository navigation
Expand file tree
/
Copy pathhaha.html
More file actions
48 lines (48 loc) · 1.69 KB
/
Copy pathhaha.html
File metadata and controls
48 lines (48 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<html lang="en">
<head>
<title>NLX Widget Sample HTML</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script defer src="https://unpkg.com/@nlxai/chat-widget/lib/index.umd.js"></script>
<script>
window.addEventListener("DOMContentLoaded", () => {
const widget = nlxai.chatWidget.create({
config: {
botUrl: "https://bots.dev.studio.nlx.ai/c/kQMVl5AV3hfwJWLcuTCF3/Ext2eq5ZAYOYpJO9mTOyo",
headers: {
"nlx-api-key": "OUR API KEY"
},
languageCode: "en-US"
},
titleBar: {
"title": "Support",
"withCollapseButton": true,
"withCloseButton": true
},
// CUSTOM BEHAVIOR SNIPPET
onExpand: (conversationHandler) => {
const checkMessages = (messages) => {
if (messages.length === 0) {
conversationHandler.sendWelcomeIntent();
}
conversationHandler.unsubscribe(checkMessages);
};
conversationHandler.subscribe(checkMessages);
},
// CUSTOM BEHAVIOR SNIPPET END
theme: {
"primaryColor": "#2663da",
"darkMessageColor": "#2663da",
"lightMessageColor": "#EFEFEF",
"white": "#FFFFFF",
"fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif",
"spacing": 12,
"borderRadius": 8,
"chatWindowMaxHeight": 640
}
});
});
</script>
</body>
</html>