6 var t = this, last = 0, co = $('#content');
8 $('#wp-word-count').html( wordCountL10n.count.replace( /%d/, '<span id="word-count">0</span>' ) );
11 co.keyup( function(e) {
12 if ( e.keyCode == last ) return true;
13 if ( 13 == e.keyCode || 8 == last || 46 == last ) t.wc(co.val());
20 var t = this, w = $('#word-count'), tc = 0;
22 if ( t.block ) return;
25 setTimeout( function() {
27 tx = tx.replace( /<.[^<>]*?>/g, ' ' ).replace( / | /gi, ' ' );
28 tx = tx.replace( /[0-9.(),;:!?%#$¿'"_+=\\/-]*/g, '' );
29 tx.replace( /\S\s+/g, function(){tc++;} );
31 w.html(tc.toString());
33 setTimeout( function() { t.block = 0; }, 2000 );
38 $(document).ready( function(){ wpWordCount.init(); } );