<commit_before>(function(){
        
    var buttons = {},
    edit_mode = false,
    introduction = document.getElementById('intro');
            
    [    
        ['cancel', 'Annuler', init],
        ['save',   'Enregistrer', save_edit],
        ['edit',   'Éditer', edit]    
    ]
    .forEach(function(b) 
    {
        buttons[b[0]] = document.createElement('button');
        buttons[b[0]].innerText = b[1];
        buttons[b[0]].onclick = b[2];
    });
                
    function edit() 
    {
    
        if (edit_mode) 
            return;
        edit_mode = true;
                          
        introduction.setAttribute('contenteditable', edit_mode);
        introduction.focus();
                                                            
        document.body.removeChild(buttons.edit);
        document.body.appendChild(buttons.save);
        document.body.appendChild(buttons.cancel);
    
    }
                    
    function init() 
    {
    
        if (!edit_mode)
            return;
        edit_mode = false;
                                                
        introduction.setAttribute('contenteditable', edit_mode);
                                                    
        document.body.removeChild(buttons.save);
        document.body.removeChild(buttons.cancel);
        document.body.appendChild(buttons.edit);        
        
    }
                        
    function save_edit() 
    {
    
        var text = introduction.innerText;
        init();
    
    }
                            
    document.body.appendChild(buttons.edit);

})();<commit_msg>fix error (have to fix position)<commit_after>(function(){
        
    var buttons = {},
    edit_mode = false,
    introduction = document.getElementById('intro');
            
    [    
        ['cancel', 'Annuler', init],
        ['save',   'Enregistrer', save_edit],
        ['edit',   'Éditer', edit]    
    ]
    .forEach(function(b) 
    {
        buttons[b[0]] = document.createElement('button');
        buttons[b[0]].innerText = b[1];
        buttons[b[0]].onclick = b[2];
    });
    introduction.appendChild(buttons.edit);
                
    function edit() 
    {
    
        if (edit_mode) 
            return;
        edit_mode = true;
                          
        introduction.setAttribute('contenteditable', edit_mode);
        introduction.focus();
                                                            
        introduction.removeChild(buttons.edit);
        introduction.appendChild(buttons.save);
        introduction.appendChild(buttons.cancel);
    
    }
                    
    function init() 
    {
    
        if (!edit_mode)
            return;
        edit_mode = false;
                                                
        introduction.setAttribute('contenteditable', edit_mode);
                                                    
        introduction.removeChild(buttons.save);
        introduction.removeChild(buttons.cancel);
        introduction.appendChild(buttons.edit);        
        
    }
                        
    function save_edit() 
    {
    
        var text = introduction.innerText;
        init();
    
    }
                            

})();
{'fraction_non_alphanumeric': 0.10915275200989487, 'fraction_numerical': 0.0030921459492888066, 'mean_word_length': 1.2081911262798635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7364336', 'n_tokens_mistral': 796, 'n_tokens_neox': 770, 'n_words': 115}