-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurl-embed.html
63 lines (58 loc) · 2.65 KB
/
url-embed.html
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript">
const queryString = window.location.search;
console.log("queryString=" + queryString);
const urlParams = new URLSearchParams(queryString);
console.log("urlParams=" + urlParams);
window.adaSettings = {
handle: urlParams.get('handle'),
language: urlParams.get('language'),
greeting: urlParams.get('greeting'),
cluster: urlParams.get('cluster'),
domain: urlParams.get('domain'),
hideMask: urlParams.get('hideMask'),
privateMode: urlParams.get('privateMode'),
rolloutOverride: urlParams.get('rolloutOverride'),
metaFields: urlParams.get('metaFields'),
sensitiveMetaFields: urlParams.get('sensitiveMetaFields'),
testMode: urlParams.get('testMode'),
crossWindowPersistence: urlParams.get('crossWindowPersistence'),
parentElement: "content_frame",
lazy: false
// adaReadyCallback: function(isRolledOut) {
// onAdaReady.postMessage(JSON.stringify(isRolledOut));
// },
// onAdaEmbedLoaded: () => {
// adaEmbed.subscribeEvent("ada:chat_frame_timeout", (data, context) => {
// onLoaded.postMessage(JSON.stringify(data));
// });
// },
// eventCallbacks: {
// "*": function(event) {
// onEvent.postMessage(JSON.stringify(event));
// }
// },
// conversationEndCallback: function(event) {
// onConversationEnd.postMessage(JSON.stringify(event));
// },
// toggleCallback: function(isDrawerOpen) {
// onDrawerToggle.postMessage(JSON.stringify(isDrawerOpen));
// }
};
console.log("adaSettings=" + JSON.stringify(window.adaSettings));
</script>
<script defer id="__ada" src="https://static.ada.support/embed2.js"></script>
</head>
<body style="position: absolute; bottom: 0px; top: 0px; left: 0px; right: 0px; margin: 0; padding: 0;">
<div id="content_frame" style="height: 100%; width: 100%"></div>
<style>
#ada-button-frame {
display: none;
}
</style>
</body>
</html>