1jQuery(document).ready(function() { 2 jQuery('body').on('click','.jm-post-like',function(event){ 3 event.preventDefault(); 4 heart = jQuery(this); 5 post_id = heart.data("post_id"); 6 heart.html("<i class='linecon-icon-heart'></i> <i class='icon-cog icon-spin'></i>"); 7 jQuery.ajax({ 8 type: "post", 9 url: ajax_var.url, 10 data: "action=jm-post-like&nonce="+ajax_var.nonce+"&jm_post_like=&post_id="+post_id, 11 success: function(count){ 12 if( count.indexOf( "already" ) !== -1 ) 13 { 14 var lecount = count.replace("already",""); 15 if (lecount == 0) 16 { 17 var lecount = "Like"; 18 } 19 heart.prop('title', 'Like'); 20 heart.removeClass("liked"); 21 heart.html("<i class='linecon-icon-heart'></i> "+lecount); 22 } 23 else 24 { 25 heart.prop('title', 'Unlike'); 26 heart.addClass("liked"); 27 heart.html("<i class='linecon-icon-heart'></i> "+count); 28 } 29 } 30 }); 31 }); 32});
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.