<commit_before>function addCounter(){		
    $.each(
        $("[name*='content']"),        
        function (key, elt){
            if ($(elt).prev('span').length>0) {
                return;
            }
            $("<span style='float: right; padding-right: 13px;'> <span id="+$(elt).attr('name')+">"+$(elt).val().replace(/{.*}/g, '').length+"</span> Characters</span>").insertBefore($(elt));
            $(elt).focus(function(){
            	$('[id="'+$(elt).attr('name')+'"]').text($(this).val().replace(/{.*}/g, '').length);            	
            }).keyup(function(){                   
                    $('[id="'+$(elt).attr('name')+'"]').text($(this).val().replace(/{.*}/g, '').length);
            });
        });
}  <commit_msg>added mouseenter and change events<commit_after>function addCounter(){		
    $.each(
        $("[name*='content']"),        
        function (key, elt){
            if ($(elt).prev('span').length>0) {
                return;
            }
            $("<span style='float: right; padding-right: 13px;'> <span id="+$(elt).attr('name')+">"+$(elt).val().replace(/{.*}/g, '').length+"</span> Characters</span>").insertBefore($(elt));
            $('#predefined-message').on('change', function(event){
            	$('[id="'+$(elt).attr('name')+'"]').text($(elt).val().replace(/{.*}/g, '').length);            	
            });
            $(elt).mouseenter(function(){
            	$('[id="'+$(elt).attr('name')+'"]').text($(this).val().replace(/{.*}/g, '').length);            	
            }).keyup(function(){                   
                $('[id="'+$(elt).attr('name')+'"]').text($(this).val().replace(/{.*}/g, '').length);
            });
        });
}  
{'fraction_non_alphanumeric': 0.2919836161497952, 'fraction_numerical': 0.003510825043885313, 'mean_word_length': 1.9790940766550522, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7117023', 'n_tokens_mistral': 531, 'n_tokens_neox': 526, 'n_words': 58}