1if ( jQuery("#penci_rateyo").length ) { 2 var $this = jQuery("#penci_rateyo"), 3 rate = parseFloat( $this.data('rate') ), 4 allow = $this.data('allow'), 5 total = $this.data('total'), 6 people_numb = parseInt( $this.data('people') ); 7 8 $this.rateYo({ 9 rating: rate, 10 fullStar: true, 11 starWidth: "12px", 12 spacing: "3px", 13 normalFill: PENCI.normalFill, 14 ratedFill: PENCI.ratedFill, 15 onSet: function ( rating, rateYoInstance ) { 16 jQuery(this).rateYo("option", "readOnly", true); 17 var postid = jQuery(this).data('postid'); 18 19 jQuery.ajax({ 20 type: "POST", 21 url: PENCI.ajaxUrl, 22 dataType: 'html', 23 data: { action: 'penci_pennews_rateyo', nonce: PENCI.nonce, postid: postid, rating: rating }, 24 success: function( data ) { 25 var parent = jQuery(this).parent(), 26 new_rate = ( total + rating ) / ( people_numb + 1 ); 27 jQuery('.penci-rate-number', parent).html(new_rate); 28 $this.rateYo("rating", new_rate); 29 $this.parent().find('.penci-rate-number').html( new_rate.toPrecision(2) ); 30 $this.parent().find('.penci-number-people').html( people_numb + 1 ); 31 } 32 }); 33 } 34 }); 35 36 if ( allow == '0' ) { 37 $this.rateYo("option", "readOnly", true); 38 } 39}
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.