forked from pulumi/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintercom.html
21 lines (21 loc) · 1.48 KB
/
intercom.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!-- Intercom -->
<script>
window.intercomSettings = { app_id: "wnsab84f" };
try {
// Fetch the Pulumi identity from the relevant cookie, if available, or undefined otherwise. This information
// is stored in the pulumi_user_info and is in a URI-encoded JSON blob, prefixed with the text "j:".
var userCookie = decodeURIComponent(
document.cookie.replace(/(?:(?:^|.*;\s*)pulumi_user_info\s*\=\s*([^;]*).*$)|^.*$/, "$1"));
if (userCookie && userCookie.length > 2) {
var userInfo = JSON.parse(userCookie.substring(2));
window.intercomSettings.pulumiId = userInfo.id;
window.intercomSettings.name = userInfo.name;
window.intercomSettings.email = userInfo.email;
window.intercomSettings.githubLogin = userInfo.githubLogin;
}
}
catch {
// Ignore any errors in the user cookie -- we will just omit Intercom user info.
}
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/wnsab84f';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>