1jQuery(document).ready(function($){var selectedCurrency=document.cookie.split("; ").find((row)=>row.startsWith("selectedCurrency="))?.split("=")[1];$.getJSON('https://racecarsforyou.com/rates.json',function(data){if(typeof fx!=="undefined"&&fx.rates){fx.rates=data.rates;fx.base=data.base}else{var fxSetup={rates:data.rates,base:data.base}} 2initSwitcher(data)});function initSwitcher(data){var currency_div=document.createElement('div');currency_div.className='currency-selector';document.getElementById('secondary-navigation').insertAdjacentElement('beforebegin',currency_div);var label_for=document.createElement('label');label_for.innerHTML='Use Currency:';label_for.htmlFor='currency-switcher';var select_list=document.createElement("select");select_list.id='currency-switcher';currency_div.appendChild(label_for);currency_div.appendChild(select_list);var currencies=Object.keys(data.rates);currencies.unshift('Default','USD','GBP','CAD','EUR','AUD');currencies=currencies.filter((item,index)=>currencies.indexOf(item)===index);for(i=0;i<currencies.length;i++){var option=document.createElement("option");option.value=currencies[i];option.text=currencies[i];if(selectedCurrency&&selectedCurrency==option.value) 3option.setAttribute('selected','selected');select_list.appendChild(option)} 4document.getElementById('currency-switcher').addEventListener('change',currencySwitch);document.addEventListener('facetwp-refresh',function(){FWP.facets.currency=selectedCurrency});document.addEventListener('facetwp-loaded',function(){updatePricesOnPage()});document.getElementById('mobile-toggle').addEventListener('click',function(evt){document.getElementById('mobile-site-navigation').appendChild(currency_div)});if(selectedCurrency) 5updatePricesOnPage();} 6function currencySwitch(evt){if(evt.target.value=='Default'){document.cookie='selectedCurrency=; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=None; Secure; Path=/';selectedCurrency=''}else{document.cookie='selectedCurrency='+evt.target.value+'; SameSite=None; Secure; Path=/';selectedCurrency=evt.target.value} 7if(typeof FWP!=='undefined') 8FWP.facets.currency=selectedCurrency;updatePricesOnPage()} 9function updatePricesOnPage(){$('.listing-price').each(function(i,el){if(!$(el).data().hasOwnProperty('price')) 10return;var price=$(el).data('price');if(price.length==0) 11return;var base=$(el).data('currency');var sale_price='';if($(el).data().hasOwnProperty('salePrice')) 12sale_price=$(el).data('salePrice');var new_price=price.toLocaleString('en-US',{style:'currency',currency:base,minimumFractionDigits:0,maximumFractionDigits:0});var new_sale_price='';if(sale_price){new_sale_price=sale_price.toLocaleString('en-US',{style:'currency',currency:base,minimumFractionDigits:0,maximumFractionDigits:0})} 13if(selectedCurrency){new_price=Math.round(fx.convert(price,{from:base,to:selectedCurrency})).toLocaleString('en-US',{style:'currency',currency:selectedCurrency,minimumFractionDigits:0,maximumFractionDigits:0,});if(sale_price){new_sale_price=Math.round(fx.convert(sale_price,{from:base,to:selectedCurrency})).toLocaleString('en-US',{style:'currency',currency:selectedCurrency,minimumFractionDigits:0,maximumFractionDigits:0,})}} 14if(sale_price){var strikeout=$(el).children('.strikeout');if(strikeout.length>0) 15$(strikeout[0]).text(new_price);var sale_span=$(el).children('.sale_price');if(sale_span.length>0) 16$(sale_span[0]).text(new_sale_price);}else $(el).text(new_price)})} 17function getCurrencySymbol(locale,currency){return(0).toLocaleString(locale,{style:'currency',currency:currency,minimumFractionDigits:0,maximumFractionDigits:0}).replace(/\d/g,'').trim()}})
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.