1$(document).ready(function () { 2 if ($.cookie('TEXT_SIZE')) { 3 $('body').addClass($.cookie('TEXT_SIZE')); 4 } 5 $('.resizer a').on('click', (function () { 6 var textSize = $(this).parent().attr('class'); 7 $('body').removeClass('small medium large').addClass(textSize); 8 $.cookie('TEXT_SIZE', textSize, { path: '/', expires: 10000 }); 9 return false; 10 })); 11 12 //Moving accessibility icon to left on mobile 13 setInterval(function () { 14 if ($('body').hasClass('INDMobile')) { 15 $('body').removeClass('INDpositionRight').addClass('INDpositionLeft'); 16 } else { 17 clearInterval(); 18 } 19 }, 500); 20 21 // Showing page title for OrderConfirm page 22 if (window.location.href.toLowerCase().indexOf("confirmorder.aspx") > -1) { 23 $('#header_about').removeClass('hidden'); 24 } 25 26 // top message line shown-hidden 27 let topMessageLineShown = getCookie('topMessageLineShown'); 28 29 if ((topMessageLineShown == undefined) || (topMessageLineShown == true) || (topMessageLineShown == '')) { 30 $('#topMessageLineWrapper').show(); 31 $('body').addClass('topMessageLineShown'); 32 changeMarginTop(); 33 34 } else { 35 $('#topMessageLineWrapper').hide(); 36 $('body').removeClass('topMessageLineShown'); 37 changeMarginTop(); 38 } 39 40 $('#closeTopMessageLineButton').on('click', function () { 41 $('#topMessageLineWrapper').hide(); 42 $('body').removeClass('topMessageLineShown'); 43 changeMarginTop(); 44 45 document.cookie = 'topMessageLineShown=false; max-age=3600;'; 46 }); 47 48 changeMarginTop(); 49 50 $(window).on("orientationchange", function () { 51 setTimeout(function () { 52 changeMarginTop(); 53 }, 100); 54 }); 55 56 57 // scrolling to top of prices block 58 $('.PageHeadingArea a[href^="#"]').on('click', (function (event) { 59 event.preventDefault(); 60 var linkHref = $(this).attr('href'); 61 scrollToBlock($(linkHref)); 62 })); 63 64 65 // if URL like ..../github#pricesBlock scrolling to relevant anchor, preventing browser default behavior 66 // Disable automatic scroll restoration when navigating back/forward 67 if ('scrollRestoration' in history) { 68 history.scrollRestoration = 'manual'; 69 } 70 71 // Check if there is a hash in the URL 72 if (window.location.hash && window.location.hash.length > 1) { 73 scrollToBlock($(window.location.hash)); 74 } 75 //if (window.location.href.indexOf("#")) { 76 // var flag = '#' + window.location.hash.substring(1); 77 // scrollToBlock($(flag)); 78 //} 79}); 80 81// Handle history changes to control scrolling when navigating back/forward 82window.addEventListener('popstate', function () { 83 if (window.location.hash && window.location.hash.length > 1) { 84 scrollToBlock($(window.location.hash)); 85 } 86 //if (window.location.hash) { 87 // var hashValue = window.location.hash.substring(1); 88 // scrollToBlock($('#' + hashValue)); 89 //} 90}); 91 92// scrolling to top of prices block 93function scrollToBlock(blockToScrollTo) { 94 var headerHeight = Math.round($('.topMenuContainer').height()); 95 var offsetTop = headerHeight + 50; 96 97 $('html, body').animate({ 98 scrollTop: blockToScrollTo.offset().top - offsetTop 99 }, 700); 100} 101 102// updating main content position upon header height 103function changeMarginTop() { 104 var marginTopHeight = Math.round($('.topMenuContainer').height()); 105 $('main > .pageMainContent').css('margin-top', marginTopHeight); 106 $('body > #aspnetForm > table.pageMainContent').css('margin-top', marginTopHeight); 107} 108 109function getCookie(cname) { 110 let name = cname + "="; 111 let decodedCookie = decodeURIComponent(document.cookie); 112 let ca = decodedCookie.split(';'); 113 for (let i = 0; i < ca.length; i++) { 114 let c = ca[i]; 115 while (c.charAt(0) == ' ') { 116 c = c.substring(1); 117 } 118 if (c.indexOf(name) == 0) { 119 return c.substring(name.length, c.length); 120 } 121 } 122 return ""; 123} 124 125// Top Menu mobile open-close 126$(function () { 127 $('.toggle-menu').on('click', (function () { 128 $('.exo-menu').toggleClass('display'); 129 130 })); 131 132}); 133 134function ShowHideDiv(CategoryId) { 135 if (document.getElementById(CategoryId).style.display == 'none') { 136 document.getElementById(CategoryId).style.display = ''; 137 } 138 else 139 document.getElementById(CategoryId).style.display = 'none'; 140} 141 142function ChangeSign(Img) { 143 Img = eval(Img) 144 if (Img.src.indexOf("plus.png") > 0) 145 Img.src = "/images/responsive/minus.png" 146 else 147 Img.src = "/images/responsive/plus.png" 148} 149 150function ChangeBG(CategoryMenuDiv) { 151 if (CategoryMenuDiv.style.backgroundImage == '' || CategoryMenuDiv.style.backgroundImage == 'url("/images/responsive/blue_arrowL.png")') { 152 CategoryMenuDiv.style.backgroundImage = "url('/images/responsive/blue_arrowD.png')"; 153 CategoryMenuDiv.style.backgroundPosition = "background-position:13px center"; 154 CategoryMenuDiv.style.backgroundRepeat = "no-repeat"; 155 } 156 else { 157 CategoryMenuDiv.style.backgroundImage = "url('/images/responsive/blue_arrowL.png')"; 158 } 159}
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.