1( function($) { 2 jQuery(window).load(function(){ 3 if(jQuery('.desc-ajax').length) { 4 jQuery('.desc-ajax').each(function () { 5 $d = jQuery(this); 6 7 if($d.hasClass('exclude-ajax')){ 8 return; 9 } 10 11 $listing_url = $d.data('url'); 12 13 if ($listing_url) { 14 jQuery.post( 15 ajax_object.ajax_url, 16 { 17 'action': 'ihf_listing_excerpt_by_url', 18 'listing-url': $listing_url 19 }, 20 function ($result) { 21 $data = jQuery.parseJSON($result); 22 //console.log($data); 23 if ($data.listing_id && $data.excerpt) { 24 $target_container = jQuery(".desc-ajax[data-id='" + $data.listing_id + "']"); 25 excerpt = $data.excerpt.substring(0,450); 26 excerpt = excerpt.substring(0, excerpt.lastIndexOf(' '));
27 $target_container.text(excerpt + ' ...'); 28 } else { 29 console.log('There\'s an error on ajax returned data.'); 30 } 31 } 32 ); 33 } 34 }); 35 } 36 37 }); 38 39})(jQuery);
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.