Skip to content

Commit 8feb955

Browse files
Refactor embedded messaging initialization scripts
1 parent 2fe601c commit 8feb955

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

godwin/sdb6/cwc.html

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,27 @@ <h2>godwin@sdb6.org</h2>
1616
</br>
1717
</br>
1818
<button type="button" id="clearAuthBtn" onclick="clearAuthSession()"> Clear Authorization Session </button>
19-
<script type='text/javascript'>
20-
function initEmbeddedMessaging() {
21-
try {
22-
embeddedservice_bootstrap.settings.language = 'en_US'; // For example, enter 'en' or 'en-US'
23-
24-
embeddedservice_bootstrap.init(
25-
'00DSG000003UGaH',
26-
'CWC',
27-
'https://godwin-sdb6.demo.test1.my.pc-rnd.site.com/ESWCWC1757100806601',
28-
{
29-
scrt2URL: 'https://godwin-sdb6.demo.test1.my.pc-rnd.salesforce-scrt.com'
30-
}
31-
);
32-
} catch (err) {
33-
console.error('Error loading Embedded Messaging: ', err);
34-
}
35-
};
36-
</script>
37-
<script type='text/javascript' src='https://godwin-sdb6.demo.test1.my.pc-rnd.site.com/ESWCWC1757100806601/assets/js/init.js' onload='initEmbeddedMessaging()'></script>
38-
</body>
19+
<script type='text/javascript'>
20+
document.getElementById('editThisPageLink').href = "https://github.com/ESW1234/esw1234.github.io/edit/master" + window.location.pathname;
21+
</script>
22+
<script type='text/javascript'>
23+
function initEmbeddedMessaging() {
24+
try {
25+
embeddedservice_bootstrap.settings.language = 'en_US'; // For example, enter 'en' or 'en-US'
26+
27+
embeddedservice_bootstrap.init(
28+
'00DSG000003UGaH',
29+
'CWC',
30+
'https://godwin-sdb6.demo.test1.my.pc-rnd.site.com/ESWCWC1757100806601',
31+
{
32+
scrt2URL: 'https://godwin-sdb6.demo.test1.my.pc-rnd.salesforce-scrt.com'
33+
}
34+
);
35+
} catch (err) {
36+
console.error('Error loading Embedded Messaging: ', err);
37+
}
38+
};
39+
</script>
40+
<script type='text/javascript' src='https://godwin-sdb6.demo.test1.my.pc-rnd.site.com/ESWCWC1757100806601/assets/js/init.js' onload='initEmbeddedMessaging()'></script>
41+
</body>
3942
</html>

0 commit comments

Comments
 (0)