PageSourceSearch

https://www.charleskeith.co.uk/on/demandware.static/Sites-ck-gb-Site/-/en_GB/v1790580897501/js/initLiveChat.js

js charleskeith.co.uk collected 2026-09-29 00:17:43 UTC 2,878 bytes, 1 lines download raw bytes

1(()=>{var e={p:""};e.p=window.urls.jsPublicPath,(()=>{if("true"!==function(){const e={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,(t,n,i)=>{e[n]=i}),e}().appview){const e=document.getElementById("embeddedSvcSettings"),t=e.getAttribute("data-live-chat-preferences");let n;try{n=JSON.parse(t)}catch(e){console.error("Can't parse Live Chat preferences config data. Error: ",e)}const i=function(t){const i=e.getAttribute("data-embedded-svc-settings")||"",s=e.getAttribute("data-customer-data");let d,a;if(i.length)try{d=JSON.parse(i)}catch(e){console.error("Can't parse embeddedSvcSettings custom preference. Error: ",e)}if(s.length)try{a=JSON.parse(s)}catch(e){console.error("Can't parse customer data. Error: ",e)}Object.assign(embedded_svc.settings,d||{}),embedded_svc.settings.directToButtonRouting=function(e){return"Retail Enquiry"===e[2].value?n.retailEnquiryId:n.buttonId},a&&(embedded_svc.settings.prepopulatedPrechatFields={FirstName:a.firstName,LastName:a.lastName,SuppliedEmail:a.email}),embedded_svc.init(n.baseCoreURL,n.communityEndpointURL,t,n.orgId,n.eswConfigDevName,{baseLiveAgentContentURL:n.baseLiveAgentContentURL,deploymentId:n.deploymentId,buttonId:n.buttonId,baseLiveAgentURL:n.baseLiveAgentURL,eswLiveAgentDevName:n.eswLiveAgentDevName,isOfflineSupportEnabled:n.isOfflineSupportEnabled})};if(window.embedded_svc)i(n.gslbBaseURL);else{const e=document.createElement("script");e.setAttribute("src",n.fallbackScriptUrl||""),e.onload=function(){i(null)},document.body.appendChild(e)}document.addEventListener("DOMContentLoaded",()=>{let e=document.querySelector(".js-liveChat-btn");const t=document.querySelector(".kakao_liveChat");if(!e&&t&&(e=document.querySelector(".js-kakao-livechat-chat-btn")),window.embedded_svc&&window.embedded_svc.settings&&window.embedded_svc.settings.displayHelpButton&&e){function n(e){e.preventDefault();const t=document.querySelector(".helpButtonEnabled"),n=document.querySelector(".embeddedServiceSidebarMinimizedDefaultUI");n?n.click():t&&t.click()}function i(t){t.preventDefault();const n=e.getAttribute("data-contact-us-url");n&&"null"!==n&&(window.location.href=n)}document.addEventListener("click",t=>{"string"==typeof t.target.className&&-1!==t.target.className.indexOf("js-liveChat")&&(t.preventDefault(),e.click())});setInterval(()=>{window.embedded_svc.settings.agentAvailableOnButtonClick?function(e,n,i){e.classList.contains("online")||(e.classList.remove("d-none","offline"),t&&t.classList.remove("d-none"),e.classList.add("online"),e.removeEventListener("click",i),e.addEventListener("click",n))}(e,n,i):window.embedded_svc.settings.isOfflineSupportEnabled&&function(e,n,i){e.classList.contains("offline")||(e.classList.remove("d-none","online"),t&&t.classList.remove("d-none"),e.classList.add("offline"),e.removeEventListener("click",n),e.addEventListener("click",i))}(e,n,i)},1e4)}})}})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.