1( function ( $ ) { 2 // Counter 3 window[ 'ibCounter' ] = function () { 4 var $counters = $( '.ib-counter' ); 5 $counters.each( function () { 6 if ( 7 $( 'body' ).hasClass( 'wp-admin' ) && 8 $( this ).parents( '.wp-block-ideabox-counter.is-selected' ) 9 .length === 0 10 ) { 11 return; 12 } 13 if ( 14 $( window ).scrollTop() > 15 $( this ).offset().top - window.innerHeight 16 ) { 17 var $element = $( this ).find( '.ib-counter-number' ), 18 data = { 19 fromValue: $element.attr( 'data-from-value' ), 20 toValue: $element.attr( 'data-to-value' ), 21 delimiter: $element.attr( 'data-delimiter' ), 22 duration: $element.attr( 'data-duration' ), 23 onComplete: function () { 24 $element.addClass( 'ib-counter-complete' ); 25 }, 26 }, 27 decimalDigits = data.toValue.toString().match( /\.(.*)/ ); 28 29 if ( decimalDigits ) { 30 data.rounding = decimalDigits[ 1 ].length; 31 } 32 if ( 'none' === data.delimiter ) { 33 data.delimiter = ''; 34 } 35 36 if ( $( 'body' ).hasClass( 'wp-admin' ) ) { 37 data.onComplete = function () {}; 38 $element.empty(); 39 } 40 41 if ( ! $element.hasClass( 'ib-counter-complete' ) ) { 42 $element.numerator( data ); 43 } 44 } 45 } ); 46 }; 47 48 if ( $( '.ib-counter' ).length > 0 ) { 49 ibCounter(); 50 $( window ).on( 'scroll', function () { 51 ibCounter(); 52 } ); 53 } 54} )( 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.