wp/wp-admin/js/word-count.js
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
       
     1 /* global wordCountL10n */
       
     2 var wpWordCount;
     1 (function($,undefined) {
     3 (function($,undefined) {
     2 	wpWordCount = {
     4 	wpWordCount = {
     3 
     5 
     4 		settings : {
     6 		settings : {
     5 			strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
     7 			strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
    32 				w.html(tc.toString());
    34 				w.html(tc.toString());
    33 
    35 
    34 				setTimeout( function() { t.block = 0; }, 2000 );
    36 				setTimeout( function() { t.block = 0; }, 2000 );
    35 			}, 1 );
    37 			}, 1 );
    36 		}
    38 		}
    37 	}
    39 	};
    38 
    40 
    39 	$(document).bind( 'wpcountwords', function(e, txt) {
    41 	$(document).bind( 'wpcountwords', function(e, txt) {
    40 		wpWordCount.wc(txt);
    42 		wpWordCount.wc(txt);
    41 	});
    43 	});
    42 }(jQuery));
    44 }(jQuery));