1 2; /* Start:"a:4:{s:4:"full";s:73:"/local/components/mc21/online/templates/.default/script.js?17908722892873";s:6:"source";s:58:"/local/components/mc21/online/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3(function() { 4 "use strict"; 5 6 window.updateParamsAndScroll = function(params) { 7 const cleanParams = params.startsWith('?') ? params.substring(1) : params; 8 const currentPath = window.location.pathname; 9 const newParams = new URLSearchParams(cleanParams); 10 const paramsString = newParams.toString(); 11 const newUrl = currentPath + (paramsString ? '?' + paramsString : ''); 12 13 window.history.pushState(null, '', newUrl); 14 window.dispatchEvent(new PopStateEvent("popstate")); 15 16 const rootElement = document.getElementById("mcxxi-widget"); 17 if (rootElement) { 18 rootElement.scrollIntoView({ behavior: "smooth", block: "start" }); 19 } 20 }; 21 22 function handleOzLinkClick(e, href) { 23 e.preventDefault(); 24 e.stopPropagation(); 25 e.stopImmediatePropagation(); 26 27 if (!href || href === '' || href === '#') return false; 28 29 try { 30 const url = new URL(href, window.location.origin); 31 const currentPath = window.location.pathname; 32 33 if (url.pathname !== currentPath) { 34 window.location.href = href; 35 return false; 36 } 37 38 if (url.search) { 39 window.updateParamsAndScroll(url.search); 40 } 41 return false; 42 } catch (error) { 43 const currentPath = window.location.pathname; 44 const queryIndex = href.indexOf('?'); 45 if (queryIndex === -1) return false; 46 47 const linkPath = href.substring(0, queryIndex).replace(/\/$/, '') || '/'; 48 const normalizedCurrentPath = currentPath.replace(/\/$/, '') || '/'; 49 50 if (linkPath !== normalizedCurrentPath && linkPath !== currentPath) { 51 window.location.href = href; 52 return false; 53 } 54 55 const params = href.substring(queryIndex); 56 window.updateParamsAndScroll(params); 57 return false; 58 } 59 } 60 61 function setupOzLinks() { 62 const links = document.querySelectorAll('a[data-oz]'); 63 for (let i = 0; i < links.length; i++) { 64 const link = links[i]; 65 link.onclick = function(e) { 66 if (this.hasAttribute('data-oz')) { 67 return handleOzLinkClick(e, this.getAttribute('href')); 68 } 69 }; 70 } 71 } 72 73 if (document.readyState === 'loading') { 74 document.addEventListener('DOMContentLoaded', setupOzLinks); 75 } else { 76 setupOzLinks(); 77 } 78 79 window.addEventListener('click', function(e) { 80 const link = e.target.closest('a'); 81 if (link && link.hasAttribute('data-oz')) { 82 handleOzLinkClick(e, link.getAttribute('href')); 83 } 84 }, true); 85})(); 86/* End */ 87;; /* /local/components/mc21/online/templates/.default/script.js?17908722892873*/
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.