1var paseURL = function(href) { 2 var link = document.createElement("a"); 3 link.href = href; 4 return link; 5}; 6 7$(function() 8{ 9 $(".head .cart a>.detail span").html(getData("RFQ","list").length+" Part"); 10 11 $(".dosearch").click(function(){ 12 $("#search").submit(); 13 }); 14 15 //夿è¯è¨ 16 var lang=getData('Lang'); 17 if(lang.country==null || lang.country!='') 18 { 19 if(lang.country==null) 20 { 21 saveData('Lang',{"country":""}); 22 } 23 $.post('?',{"act":"Lang","country":(lang.country==null?'':lang.country)}, function(data) 24 { 25 if(!data.done)return; 26 if(lang.country!=null) 27 { 28 if(lang.country!=data.current.Code) 29 { 30 location.href=data.country.Link; 31 } 32 }else if(data.current.Code!=data.country.Code) 33 { 34 $("body").append('<div class="selectCountry"><i>Close</i><h3>Please your location</h3><ul class="clearfix"><li class="'+data.country.Code+'" onclick="setLanguage(this,\''+data.country.Link+'\');">'+data.country.Name+'</li><li class="'+data.current.Code+'" onclick="setLanguage(this);">'+data.current.Name+'</li></ul></div><div class="selectCountryLayer"></div>'); 35 $(".selectCountry i,.selectCountryLayer").click(function(){ 36 $(".selectCountry,.selectCountryLayer").hide(); 37 }); 38 } 39 },'JSON'); 40 } 41 42 //æ£æµæ¯å¦æCookieææ 43 var data=getData('Info'); 44 if(!data.agreeCookies && location.hash!='#noCookies') 45 { 46 $.get('/cookies', function(data) 47 { 48 if(!data.done) 49 { 50 return false; 51 } 52 $("body").append('<div id="cookies-prompt"><div class="container">'+data.HTML+'</div></div>'); 53 54 //åæææ 55 $("#cookies-prompt .accept-cookies").click({obj:'#cookies-prompt'},acceptCookie); 56 57 //æç»ææ 58 $("#cookies-prompt .reject-cookies,#cookies-prompt .close").click({obj:'#cookies-prompt'},rejectCookie); 59 60 //çæµCookieæ¯å¦ç¹å»ï¼ç¹å»äºåç»ä¸æ¸ é¤Cookieæç¤º 61 cookiesTimer=setInterval(function() 62 { 63 var data=getData('Info'); 64 if(data.agreeCookies) 65 { 66 $("#cookies-prompt").fadeOut(); 67 clearInterval(cookiesTimer); 68 } 69 },1000); 70 71 },'JSON'); 72 } 73 74 if($(".blog_detail").length>0){ 75 $(".blog_detail").parent().css('boxShadow', 'none') 76 } 77 78 // å客询ç表åè¾å ¥ææ 79 if($("#blog_rec .inquiry").length>0){ 80 $('#blog_rec .inquiry ul li label').click(function(){ 81 $(this).next('input').focus() 82 $(this).next('textarea').focus() 83 }) 84 85 setTimeout(() => { 86 $("#blog_rec .inquiry input").each(function(){ 87 if($(this).val() != ''){ 88 $(this).parent().addClass('entered') 89 }else{ 90 $(this).parent().removeClass('entered') 91 } 92 }) 93 }, 0); 94 95 $('#blog_rec .inquiry ul li input, #blog_rec .inquiry ul li textarea').focus(function(){ 96 $(this).parent().addClass('focus') 97 }).blur(function(){ 98 $(this).parent().removeClass('focus') 99 if($(this).val() != ''){ 100 $(this).parent().addClass('entered') 101 }else{ 102 $(this).parent().removeClass('entered') 103 } 104 }) 105 } 106 107 // å客详æ è¡¨æ ¼ç§»å¨ç«¯éé 108 if ($("#blog_content .blog_text").length > 0) { 109 const tableContainer = document.querySelector('.blog_text'); 110 const tables = tableContainer.querySelectorAll('table'); 111 112 tables.forEach(function(table) { 113 const wrapper = document.createElement('div'); 114 wrapper.classList.add('table-wrapper'); 115 table.parentNode.insertBefore(wrapper, table); 116 wrapper.appendChild(table); 117 const containerWidth = wrapper.offsetWidth; 118 const tableWidth = table.offsetWidth; 119 120 if (tableWidth > containerWidth) { 121 const scaleRatio = containerWidth / tableWidth; 122 table.style.transform = `scale(${scaleRatio})`; 123 table.style.transformOrigin = 'top left'; 124 const scaledHeight = table.scrollHeight * scaleRatio; 125 wrapper.style.height = `${scaledHeight}px`; 126 } 127 }); 128 } 129 130}); 131 132function setLanguage(obj,Link) 133{ 134 saveData('Lang',{"country":obj.className}); 135 if(Link!=null) 136 { 137 location.href=Link; 138 }else{ 139 $(".selectCountry,.selectCountryLayer").hide(); 140 } 141}
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.