1var salesforce_loaded = 0; 2function OpenFreshDesk() { 3 if( !salesforce_loaded ){ 4 if(configUrls.DOMAIN == 'uk'){ 5 setCookieVal("slsfrcChat", 1); 6 } 7 if( configUrls.DOMAIN == 'frg' ){ 8 window.consentScripts = [{ 9 key: "SF", 10 type: "analytics", 11 url: "https://service.force.com/embeddedservice/5.0/esw.min.js", 12 callback: function () { 13 salesforce_loaded = 1; 14 if (!window.embedded_svc) { 15 var s = document.createElement('script'); 16 s.setAttribute('src', 'https://boldllc.my.salesforce.com/embeddedservice/5.0/esw.min.js'); 17 s.onload = function() { 18 initESW(null); 19 }; 20 document.body.appendChild(s); 21 } else { 22 initESW('https://service.force.com'); 23 } 24 } 25 }]; 26 } 27 else{ 28 var script_sf = document.createElement('script'); 29 script_sf.setAttribute('type', 'text/javascript'); 30 script_sf.src = 'https://service.force.com/embeddedservice/5.0/esw.min.js'; 31 document.body.appendChild(script_sf); 32 33 script_sf.onload = function() { 34 salesforce_loaded = 1; 35 if (!window.embedded_svc) { 36 var s = document.createElement('script'); 37 s.setAttribute('src', 'https://boldllc.my.salesforce.com/embeddedservice/5.0/esw.min.js'); 38 s.onload = function() { 39 initESW(null); 40 }; 41 document.body.appendChild(s); 42 } else { 43 initESW('https://service.force.com'); 44 } 45 } 46 } 47 } 48 49 var initESW = function(gslbBaseURL) { 50 embedded_svc.settings.displayHelpButton = true; //Or false 51 embedded_svc.settings.language = configUrls.SF_LANG; //enter 'en' or 'en-US' 52 embedded_svc.settings.defaultMinimizedText = configUrls.SF_CHAT_WITH; //(Defaults to Chat with an Expert) 53 embedded_svc.settings.disabledMinimizedText = configUrls.SF_AGENT; //(Defaults to Agent Offline) 54 55 embedded_svc.settings.loadingText = configUrls.SF_LOADING; //(Defaults to Loading) 56 //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session) 57 58 // Settings for Chat 59 //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { 60 // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. 61 // Returns a valid button ID. 62 //}; 63 //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields 64 //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId 65 //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) 66 67 embedded_svc.settings.enabledFeatures = ['LiveAgent']; 68 embedded_svc.settings.entryFeature = 'LiveAgent'; 69 embedded_svc.settings.externalStyles = ["sf_style"]; 70 71 embedded_svc.init( 72 'https://boldllc.my.salesforce.com', 73 'https://boldllc.my.salesforce-sites.com/chat', 74 gslbBaseURL, 75 '00D4x000006qNFQ', 76 configUrls.SF_PORTAL_SUPPORT, 77 { 78 baseLiveAgentContentURL: 'https://c.la13-core2.sfdc-lywfpd.salesforceliveagent.com/content', 79 deploymentId: configUrls.SF_DEPLOYMENT_ID, 80 buttonId: configUrls.SF_BUTTON_ID, 81 baseLiveAgentURL: 'https://d.la13-core2.sfdc-lywfpd.salesforceliveagent.com/chat', 82 eswLiveAgentDevName: configUrls.SF_AGENT_NAME, 83 isOfflineSupportEnabled: false 84 } 85 ); 86 if( configUrls.DOMAIN == 'fr' && document.getElementsByClassName("fr-chat-icon-wrap").length >0 ) { 87 embedded_svc.addEventHandler("onSettingsCallCompleted", function(data) { 88 if( document.getElementsByClassName("helpButtonEnabled").length >0 ) { 89 console.log( document.getElementsByClassName('helpButtonEnabled') ); 90 document.getElementsByClassName('helpButtonEnabled')[0].click(); 91 document.getElementsByClassName("fr-chat-icon-wrap")[0].classList.add("chat-enabled"); 92 } 93 }); 94 } 95 }; 96}
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.