1var searchTips = function(val){ 2 var functo = { 3 getTipsto: function(e, self) { 4 this.clearto(); 5 this.timeoutID = setTimeout(function(){ 6 getTips(e, self); 7 }, 300); 8 }, 9 clearto: function() { 10 clearTimeout(this.timeoutID); 11 delete this.timeoutID; 12 } 13 }; 14 15 $('#search').keyup(function(e){ 16 functo.getTipsto(e, this); 17 }); 18 19 $('#search').focus(function(e){ 20 if ($('#sfTips').length){ 21 $('#sfTips').fadeIn('fast'); 22 }else{ 23 getTips(e, this); 24 } 25 }); 26 27 $('#search').blur(function(e){ 28 functo.clearto(); 29 }); 30 31 $('body').on('click','#search',false); 32 $('body').on('click',function(){ 33 $('#sfTips').hide(); 34 }); 35 36 function getTips(e, self){ 37 $.ajax({ 38 method : 'POST', 39 url : '/ajax.html', 40 data : { 41 method : 'searchTips', 42 search : $(e.target).val() 43 }, 44 success : function(data){ 45 if(data != 'none'){ 46 if (!$('#sfTips').length){ 47 $('.search_form form').append(data); 48 $('#sfTips').fadeIn('fast'); 49 }else{ 50 $('#sfTips').remove(); 51 $('.search_form form').append(data).find('#sfTips').show(); 52 } 53 if ($('#sfTips .sf_tips_item').length >= 10) $('#sfTips .moreSearchResults').show(); 54 }else{ 55 $('#sfTips').fadeOut('fast', function(){ 56 $(this).remove(); 57 }); 58 } 59 }, 60 error : function(err){ 61 console.log(err, ' ajaxRouter: request error'); 62 } 63 }); 64 val = $(e.target).val(); 65 } 66}; 67searchTips(null);
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.