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