1$(function(){ 2 $(".sidebar_area").insertAfter($(".content_area .mid:last")); 3 $(".sgds-masthead-button-text").on("click",function(){ 4 $("#top-wrapper").toggleClass("show-sgds"); 5 }); 6 7 var dt = new Date(); 8 $(".footer_area #footer-year").html(dt.getFullYear()); 9 if (lastModified!=null) { 10 $(".footer_area #lastupdated").text(lastModified); 11 } 12}); 13 14function formatDate(timestamp) { 15 // Create a date object from the timestamp 16 var date = new Date(timestamp); 17 18 // Create a list of names for the months 19 var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; 20 21 // return a formatted date 22 return date.getDate() + ' ' + months[date.getMonth()] + ' ' + date.getFullYear(); 23}; 24 25function reFormatDT() { 26 var dts = document.querySelectorAll('.dt'); 27 dts = Array.from(dts); 28 dts.forEach(function (dt) { 29 var textDate = dt.textContent; 30 var formatedDate = formatDate(textDate); 31 dt.textContent = formatedDate; 32 }); 33} 34 35function toggleMenu(e, menu) { 36 e.preventDefault(); 37 document.querySelector('body').classList.toggle('open'); 38 menu.classList.toggle('open') 39} 40 41 function handleHeaderClick() { 42 var mainLinks = document.querySelectorAll('.sitemenu_area a'); 43 mainLinks = Array.from(mainLinks); 44 var event_guide = location.origin + '/event-guide'; 45 46 mainLinks.forEach(function (mainLink) { 47 mainLink.onclick = function (e) { 48 e.stopPropagation(); 49 e.preventDefault(); 50 51 var parentTag = this.parentNode.tagName.toString().toLowerCase(); 52 var is_desktop = window.innerWidth > 767; 53 var is_open = this.parentNode.classList.contains('open'); 54 var not_dropdown = mainLink.nextElementSibling === null || !('tagName' in mainLink.nextElementSibling); 55 var redirect = not_dropdown || is_desktop || is_open; 56 57 var isEventGuide = mainLink.href == event_guide; 58 var isDesignmode = document.querySelector('body.ive_designmode') != null; 59 60 var tempDisabled = isEventGuide && !isDesignmode; 61 62 if (redirect && tempDisabled === false) { 63 if (typeof mainLink.target !== 'undefined' && mainLink.target === '_blank') { 64 window.open(mainLink.href); 65 } 66 else window.location = mainLink.href; 67 } 68 else { 69 var tagname = parentTag == "li" ? "li" : "td"; 70 var wrapperNode = document.querySelector(tagname + '.open'); 71 if (wrapperNode != null) wrapperNode.classList.remove('open'); 72 73 mainLink.parentNode.classList.add('open'); 74 } 75 } 76 77 }); 78 } 79 function handleSidebarEmpty() { 80 var sidemenus = document.querySelectorAll(".sidebar_area .mid .ive_content, .sidebar_area .mid ul"); 81 sidemenus = Array.from(sidemenus); 82 var is_empty = true; 83 sidemenus.forEach(function (sidemenu) { 84 if (sidemenu.innerHTML.trim() !== "" && sidemenu.innerHTML.trim() != "<br>") { 85 is_empty = false; 86 return; 87 } 88 }); 89 90 if (is_empty) document.querySelector('body').classList.add('no-sidebar'); 91 else document.querySelector('body').classList.remove('no-sidebar'); 92 } 93 94 function removeInlinefromAnchor() { 95 var anchors = document.querySelectorAll('.content_area a[style*="inline"]'); 96 anchors = Array.from(anchors); 97 anchors.forEach(function (anchor) { 98 anchor.style.display = ''; 99 }); 100 } 101 102 // Main Function 103 window.onload = function () { 104 105 reFormatDT(); 106 handleHeaderClick(); 107 108 document.getElementById('menuToggle').onclick = function (e) { toggleMenu(e, this); } 109 110 handleSidebarEmpty(); 111 removeInlinefromAnchor(); 112 113 if (document.getElementById('ive_switchmenu') != null) { 114 var observe1 = setInterval(function () { 115 handleSidebarEmpty(); 116 removeInlinefromAnchor(); 117 }, 300); 118 } 119 120 window.onresize = function () { 121 var facebook_iframe = document.querySelector('iframe[src*="facebook"]'); 122 if (facebook_iframe !== null) {
123 facebook_iframe.src += '&width=' + facebook_iframe.parentNode.clientWidth + 'px'; 124 } 125 } 126 127 window.dispatchEvent(new Event('resize')); 128 } 129 130
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.