1(function(){ 2 const interval = setInterval(function() { 3 /** @var {HTMLLinkElement} styleJs */ 4 const stylesJs = document.querySelector('link[href^="styles"][href$=".css"]'); 5 /** @var {HTMLScriptElement} styleJs */ 6 const mainJs = document.querySelector('script[src^="main"][src$=".js"]'); 7 if (stylesJs) { 8 clearInterval(interval); 9 removeInitLoader(); 10 } else if (mainJs) { 11 clearInterval(interval); 12 mainJs.onload = removeInitLoader; 13 } 14 }, 500); 15 16 let safetyTimeout = setTimeout(function() { 17 removeInitLoader(); 18 clearInterval(interval); 19 }, 3000); 20 21 function removeInitLoader() { 22 if (safetyTimeout) { 23 clearTimeout(safetyTimeout); 24 } 25 26 const loader = document.getElementById('init-loader'); 27 if (loader) { 28 loader.parentNode.removeChild(loader); 29 } 30 } 31 32 /** 33 * Due to some caching issues the old index.html could be cached for 1 year. 34 * This is a big problem for as it would not update to the latest version of the site. 35 * As the cache for the init loader is only 300 sec, we can make a redirect to the root / page to circumvent this issue. 36 */ 37 function checkIndexHtmlCacheRedirect() { 38 const url = window.location.href; 39 if(url.endsWith('/index.html')) { 40 window.location.href = url.replace('/index.html', ''); 41 } 42 } 43 checkIndexHtmlCacheRedirect(); 44})()
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.