1jQuery( document ).ready( function () { 2 jQuery( 'body' ).on( 'click', '.penci-post-like', function ( event ) { 3 event.preventDefault(); 4 var $this = jQuery( this ), 5 post_id = $this.data( "post_id" ), 6 like_text = $this.data( "like" ), 7 unlike_text = $this.data( "unlike" ), 8 $selector = $this.children('.dt-share' ); 9 if( $this.hasClass( 'single-like-button' ) ) { 10 $selector = $this.parent().find('.count-number-like'); 11 } 12 var $like = parseInt( $selector.text() ); 13 if ( $this.hasClass( 'liked' ) ) { 14 $this.removeClass( 'liked' ); 15 $this.prop( 'title', 'Like' ); 16 $selector.html( ( $like - 1 ) ); 17 } 18 else { 19 $this.addClass( 'liked' ); 20 $this.prop( 'title', 'Unlike' ); 21 $selector.html( ( $like + 1 ) ); 22 } 23 24 jQuery.ajax( { 25 type: "post", 26 url : ajax_var.url, 27 data: "action=penci-post-like&nonce=" + ajax_var.nonce + "&penci_post_like=&post_id=" + post_id 28 } ); 29 } ); 30} );
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.