1document.addEventListener('DOMContentLoaded', () => { 2 let xhr = new XMLHttpRequest(); 3 xhr.open('GET', '/bin/coop/hfc/header-greeting.json'); 4 5 xhr.onreadystatechange = function() { 6 if (xhr.readyState === 4 && xhr.status === 200) { 7 let jsonResponse = JSON.parse(xhr.responseText); 8 9 if (jsonResponse.hasOwnProperty('lastname') && jsonResponse.hasOwnProperty('balance')) { 10 let lastNameElement = document.getElementById('headerGreetingLastname'); 11 let balanceElement = document.getElementById('headerGreetingBalance'); 12 13 if (lastNameElement && balanceElement) { 14 lastNameElement.textContent = jsonResponse.lastname; 15 balanceElement.textContent = jsonResponse.balance; 16 } 17 } 18 } 19 } 20 21 xhr.send(); 22}); 23 24document.addEventListener('DOMContentLoaded', () => { 25 let xhr = new XMLHttpRequest(); 26 27 xhr.onreadystatechange = function () { 28 if (this.readyState === 4 && this.status === 200) { 29 let responseJson = JSON.parse(xhr.response); 30 31 // Reload page with param to not get served from cache and trigger server-side logic 32 if (responseJson.doSsoRedirect) { 33 const currentUrl = new URL(window.location.href); 34 currentUrl.searchParams.set('sso-check', '1'); 35 window.location.href = currentUrl.toString(); 36 } 37 } 38 } 39 40 xhr.open('GET', '/bin/coop/hfc/sso-check.json'); 41 xhr.send(); 42}); 43
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.