1$(document).ready(function(){ 2 3 $("#landing-login-id").focus(); 4 5 $(".modal").on('shown.bs.modal', function () { 6 $("[data-modalfocus]", this).focus(); 7 $(".gsc-input", this).focus(); 8 }); 9 10 $("#nav-search-icon").on('click', function(event){ 11 event.preventDefault(); 12 $("#searchbox-li").fadeToggle(); 13 $("#searchbox-li").find("input").prop('disabled', false); 14 $("#searchbox-li").find("input").focus(); 15 16// $("#searchbox-li").removeAttr('disabled'); 17 }); 18 19 if (window.location.href.indexOf("addsearch") > -1) { 20 $("#searchbox-li").show(); 21 } 22 23 24 $('.page-scroll').click(function(e){ 25 e.preventDefault(); 26 let url = $('body').find($(this).attr('href')).offset().top; 27 $('html, body').animate({ 28 scrollTop : url 29 },700); 30 //$(this).parent().addClass('active'); 31 //$(this).parent().siblings().removeClass('active'); 32 return false; 33 }); 34 35 36 $('.pile-link').click(function(e){ 37 //e.preventDefault(); 38 let hash = $(this).data('target'); 39 let target = $(hash); 40 41 //alert(hash); 42 43 let targetHeight = $(hash).height(); 44 //alert(targetHeight); 45 46 $('#page-pile-base').height(targetHeight); 47 48 $('#page-pile-cover').height(targetHeight); 49 $('#page-pile-cover').addClass('page-pile-covered'); 50 51 target.siblings().removeClass('piled-page-shown'); 52 target.addClass('piled-page-shown'); 53 54 let pageTop = $('body').find($('#page-piling-container')).offset().top; 55 $('html, body').animate({ 56 scrollTop : pageTop 57 },700); 58 }); 59 60 61 // check to see if url contains # and if this is a page pile page 62 if ($(".page-pile-container")[0]){ 63 if (window.location.href.indexOf("#") >= 0) { 64 let hashLoc = window.location.href.indexOf("#"); 65// alert(window.location.href.indexOf("#")); 66 //alert(window.location.href.substr(hashLoc)); 67 68 69 let hash = window.location.href.substr(hashLoc); 70 let target = $(hash); 71 72 if(hash !== "#hub"){ 73 let targetHeight = $(hash).height(); 74 //alert(targetHeight); 75 76 $('#page-pile-base').height(targetHeight); 77 78 $('#page-pile-cover').height(targetHeight); 79 $('#page-pile-cover').addClass('page-pile-covered'); 80 81 target.siblings().removeClass('piled-page-shown'); 82 target.addClass('piled-page-shown'); 83 84 let pageTop = $('body').find($('#page-piling-container')).offset().top; 85 $('html, body').animate({ 86 scrollTop : pageTop 87 },700); 88 } 89 } 90 } 91 92 93 // Find all the elements on the page that use class="eml-protected" 94 var allProtectEmails = document.getElementsByClassName("eml-protected"); 95 96 // Loop through all the elements, and update them 97 for (var i = 0; i < allProtectEmails.length; i++) { 98 updateAnchor(allProtectEmails[i]) 99 } 100}); 101 102 103function decodeEmail(encodedString) { 104 // Holds the final output 105 var email = ""; 106 107 // Extract the first 2 letters 108 var keyInHex = encodedString.substr(0, 2); 109 110 // Convert the hex-encoded key into decimal 111 var key = parseInt(keyInHex, 16); 112 113 // Loop through the remaining encoded characters in steps of 2 114 for (var n = 2; n < encodedString.length; n += 2) { 115 116 // Get the next pair of characters 117 var charInHex = encodedString.substr(n, 2) 118 119 // Convert hex to decimal 120 var char = parseInt(charInHex, 16); 121 122 // XOR the character with the key to get the original character 123 var output = char ^ key; 124 125 // Append the decoded character to the output 126 email += String.fromCharCode(output); 127 } 128 return email; 129} 130 131function updateAnchor(el) { 132 // fetch the hex-encoded string 133 var encoded = el.innerHTML; 134 135 // decode the email, using the decodeEmail() function from before 136 var decoded = decodeEmail(encoded); 137 138 // Replace the text (displayed) content 139 el.textContent = decoded; 140 141 // Set the link to be a "mailto:" link 142 el.href = 'mailto:' + decoded; 143}
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.