1$(document).ready(function () { 2 var time1 = 0; 3 var show = false; 4 var names = new Array(); //æç« ååç 5 var urls = new Array(); //æç« å°å 6 $(document).keyup(function (e) { 7 var time2 = new Date().getTime(); 8 if (e.keyCode == 17) { 9 var gap = time2 - time1; 10 time1 = time2; 11 if (gap < 500) { 12 if (show) { 13 $(".cb-search-tool").css("display", "none"); 14 show = false; 15 } else { 16 $(".cb-search-tool").css("display", "block"); 17 show = true; 18 $("#cb-search-content").val(""); 19 $("#cb-search-content").focus(); 20 } 21 time1 = 0; 22 } 23 } else if (e.keyCode == 27) { 24 $(".cb-search-tool").css("display", "none"); 25 show = false; 26 time1 = 0; 27 } 28 }); 29 30 $("#cb-search-content").keyup(function (e) { 31 var time2 = new Date().getTime(); 32 if (e.keyCode == 17) { 33 var gap = time2 - time1; 34 time1 = time2; 35 if (gap < 500) { 36 if (show) { 37 $(".cb-search-tool").css("display", "none"); 38 show = false; 39 } else { 40 $(".cb-search-tool").css("display", "block"); 41 show = true; 42 $("#cb-search-content").val(""); 43 $("#cb-search-content").focus(); 44 } 45 time1 = 0; 46 } 47 } 48 }); 49 50 $("#cb-close-btn").click(function () { 51 $(".cb-search-tool").css("display", "none"); 52 show = false; 53 time1 = 0; 54 }); 55 56 $("#cb-search-btn").click(function () { 57 $(".cb-search-tool").css("display", "block"); 58 show = true; 59 $("#cb-search-content").val(""); 60 $("#cb-search-content").focus(); 61 time1 = 0; 62 }); 63 64 $.getJSON("/search/cb-search.json").done(function (data) { 65 if (data.code == 0) { 66 for (var index in data.data) { 67 var item = data.data[index]; 68 names.push(item.title); 69 urls.push(item.url); 70 } 71 72 $("#cb-search-content").typeahead({ 73 source: names, 74 75 afterSelect: function (item) { 76 $(".cb-search-tool").css("display", "none"); 77 show = false; 78 window.location.href = (urls[names.indexOf(item)]); 79 return item; 80 } 81 }); 82 } 83 }).error(function (data, b) { 84 console.log("jsonè§£æéè¯¯ï¼æç´¢åè½æä¸å¯ç¨ï¼è¯·æ£æ¥æç« titleï¼ç¡®ä¿ä¸å«ææ¢è¡çç¹æ®ç¬¦å·"); 85 }); 86 87});
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.