<commit_before>define('resize-textarea', ['underscore', 'z'], function(_, z) {
    // Auto-resizing functionality to all textareas on the page
    function resize(textarea) {
        textarea.style.height = 'auto';
        textarea.style.height = textarea.scrollHeight + 'px';
    }

    /* 0-timeout to get the already changed text */
    function delayedResize(e) {
        window.setTimeout(function() {
            resize(e.currentTarget);
        }, 0);
    }

    function resizeTextareasOnPage() {
        _.each(document.querySelectorAll('textarea'), function(obj) {
            resize(obj);
        });
    }

    z.doc.on('loaded', resizeTextareasOnPage).on('input', 'textarea', delayedResize);
});<commit_msg>Autoresizing events listen to page load<commit_after>define('resize-textarea', ['underscore', 'z'], function(_, z) {
    // Auto-resizing functionality to all textareas on the page
    function resize(textarea) {
        textarea.style.height = 'auto';
        textarea.style.height = textarea.scrollHeight + 'px';
    }

    /* 0-timeout to get the already changed text */
    function delayedResize(e) {
        window.setTimeout(function() {
            resize(e.currentTarget);
        }, 0);
    }

    function resizeTextareasOnPage() {
        _.each(document.querySelectorAll('textarea'), function(obj) {
            resize(obj);
        });
    }

    z.page.on('loaded', resizeTextareasOnPage).on('input', 'textarea', delayedResize);
});
{'fraction_non_alphanumeric': 0.141785957736878, 'fraction_numerical': 0.0027266530334014998, 'mean_word_length': 2.842931937172775, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6623206', 'n_tokens_mistral': 442, 'n_tokens_neox': 413, 'n_words': 87}