forked from ashah/helpsnapins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (63 loc) · 3.87 KB
/
index.html
File metadata and controls
69 lines (63 loc) · 3.87 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
</head>
<script src="https://service.force.com/lightning/lightning.out.js"></script>
<body>
<a href="http://websnapins.com">Main Page</a>
<a href="http://support.websnapins.com">Support</a>
<div id="button_goes_here">
<style type='text/css'>
.embeddedServiceLiveAgentChatButton .helpButton .uiButton { background-color: #005290; font-family: "Salesforce Sans", sans-serif; }
.embeddedServiceLiveAgentChatButton .helpButton .uiButton:focus {outline: 2px solid #005290}
@font-face {
font-family: 'Salesforce Sans';
src: url('https://www.sfdcstatic.com/system/shared/common/assets/fonts/SalesforceSans/SalesforceSans-Regular.woff') format('woff'),
url('https://www.sfdcstatic.com/system/shared/common/assets/fonts/SalesforceSans/SalesforceSans-Regular.ttf') format('truetype');
}
</style>
<script type='text/javascript' src='https://service.force.com/lightning/lightning.out.js'></script>
<script type='text/javascript' src='https://service.force.com/embeddedservice/1.0/esw.min.js'></script>
<script type='text/javascript'>
var initESW = function(gslbBaseUrl) {
embedded_svc.settings.avatarImgURL = '';
embedded_svc.settings.prechatBackgroundImgURL = '';
embedded_svc.settings.waitingStateBackgroundImgURL = '';
embedded_svc.settings.smallCompanyLogoImgURL = '';
embedded_svc.settings.displayHelpButton = true; //Or false
//embedded_svc.settings.onlineText = '...'; (defaults to Chat with an Expert, localized)
//embedded_svc.settings.offlineText = '...'; (defaults to Agent Offline, localized)
//embedded_svc.settings.onlineLoadingText = '...'; (defaults to Loading, localized)
embedded_svc.init('https://na1-blitz02.soma.salesforce.com', 'https://d.la-blitz02.soma.salesforce.com/chat', 'https://c.la-blitz02.soma.salesforce.com/content', 'https://eswcomm-1598a5bbd91.blitz02.soma.force.com/napiliAura', '572D00000004Dq3', '00DD00000008Xh7', '573D00000004E35', '1.0', gslbBaseUrl, '39.0', 'a', 'EmbeddedServiceLiveAgent_Parent04ID000000000AGMAY_1598a61d030'); }; if (!window.embedded_svc) { var s = document.createElement('script'); s.setAttribute('src', 'https://na1-blitz02.soma.salesforce.com/embeddedservice/1.0/esw.min.js'); s.onload = function() { initESW(null); }; document.body.appendChild(s);} else { initESW('https://na1-blitz02.soma.salesforce.com'); }
// SPOTIFY ADDITION
var iframe;
iframe = document.createElement('iframe');
iframe.src = 'http://websnapins.com/storage.html';
iframe.id = 'storage_iframe';
iframe.style.display = 'none';
document.body.appendChild(iframe);
document.domain = 'websnapins.com';
window.onbeforeunload = function (){
var storageIframe = document.getElementById("storage_iframe").contentWindow;
if(typeof liveagent != "undefined"){
storageIframe.storeSessionData("CHASITOR_SERIALIZED_KEY", liveagent.chasitor.serialize());
storageIframe.storeSessionData("ESW_MINIMIZED_WIDTH", window.sessionStorage.getItem("ESW_MINIMIZED_WIDTH"));
storageIframe.storeSessionData("LA_ESW_MINIMIZED", window.sessionStorage.getItem('LA_ESW_MINIMIZED'));
storageIframe.storeSessionData("LA_ESW_UNREAD_NOTIFS", window.sessionStorage.getItem('LA_ESW_UNREAD_NOTIFS'));
storageIframe.storeSessionData("LA_ESW_MINIMIZED_TEXT", window.sessionStorage.getItem('LA_ESW_MINIMIZED_TEXT'));
}
}
window.onload = function (){
var storageIframe = document.getElementById("storage_iframe").contentWindow;
if (storageIframe.sessionStorage.getItem("CHASITOR_SERIALIZED_KEY")){
keys = ["CHASITOR_SERIALIZED_KEY", "ESW_MINIMIZED_WIDTH", "LA_ESW_MINIMIZED", "LA_ESW_UNREAD_NOTIFS", "LA_ESW_MINIMIZED_TEXT"]
keys.forEach(function(key){
window.sessionStorage.setItem(key, storageIframe.sessionStorage.getItem(key));
});
}
}
</script>
</div>
</body>
</html>