1( function( $ ) { 2 $( document ).ready( function() { 3 4 $( 'body' ).on( 'click', '.thb-like', function() { 5 if ( $( this ).hasClass( "thb-liked" ) ) { 6 return false; 7 } 8 9 var button = $( this ), 10 post_id = button.attr( 'data-post-id' ), 11 nonce = button.attr( 'data-nonce' ), 12 likes_count = button.find( '.thb-likes-count' ), 13 data = { 14 "post_id": post_id, 15 "action": "thb_like", 16 "THB_nonce": nonce 17 }; 18 19 button.addClass( "thb-liking" ); 20 21 $.post( thb_system.ajax_url, data, function( updated_count ) { 22 if ( updated_count !== "" ) { 23 button.removeClass( "thb-liking" ); 24 button.addClass( "thb-liked" ); 25 likes_count.html( updated_count ); 26 } 27 } ); 28 29 return false; 30 } ); 31 32 } ); 33} )( 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.