-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessenger2.html
More file actions
109 lines (104 loc) · 3.72 KB
/
messenger2.html
File metadata and controls
109 lines (104 loc) · 3.72 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Messenger 2</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 40px 20px;
line-height: 1.6;
color: #333;
}
h1 {
color: #1f1f1f;
}
p {
color: #666;
}
a {
color: #0066ff;
}
.app-id {
background: #f5f5f5;
padding: 8px 12px;
border-radius: 6px;
font-family: monospace;
display: inline-block;
margin-top: 8px;
}
.placeholder {
color: #999;
font-style: italic;
}
.description {
background: #fff8e6;
border-left: 4px solid #f0c000;
padding: 12px 16px;
margin-top: 24px;
border-radius: 0 6px 6px 0;
}
</style>
</head>
<body>
<p><a href="index.html">← Back to all messengers</a></p>
<h1>Fin for Generic Platform with handover to JavaScript</h1>
<p>App ID: <span class="app-id">rpcrzsiu</span></p>
<div class="description">
<strong>Escalation behavior:</strong> If Fin can't answer a question and needs to escalate, it will run custom JavaScript code. In this case, it shows a banner at the top of the page.
</div>
<!-- Intercom Messenger Script -->
<script>
window.intercomSettings = {
api_base: "https://api-iam.intercom.io",
app_id: "rpcrzsiu",
handoff_with_javascript: () => {
const banner = document.createElement('div');
banner.style.cssText = 'position: fixed; top: 0; left: 0; right: 0; background: #0066ff; color: white; padding: 12px; text-align: center; z-index: 9999;';
banner.innerHTML = 'This is a banner message <button onclick="this.parentElement.remove()" style="margin-left: 16px; background: transparent; border: 1px solid white; color: white; padding: 4px 8px; cursor: pointer; border-radius: 4px;">Dismiss</button>';
document.body.prepend(banner);
}
};
</script>
<script>
(function(){
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic('reattach_activator');
ic('update', w.intercomSettings);
} else {
var d = document;
var i = function() {
i.c(arguments);
};
i.q = [];
i.c = function(args) {
i.q.push(args);
};
w.Intercom = i;
var l = function() {
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://widget.intercom.io/widget/rpcrzsiu';
var x = d.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
};
if (document.readyState === 'complete') {
l();
} else if (w.attachEvent) {
w.attachEvent('onload', l);
} else {
w.addEventListener('load', l, false);
}
}
})();
</script>
<!-- GoatCounter Analytics -->
<script data-goatcounter="https://intercom-messengers.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
</body>
</html>