<commit_before>//cache params
var parent = document.querySelector('#logHistory'),
    items  = parent.querySelectorAll('.history-log-wrap'),
    loadMoreBtn =  document.querySelector('#loadMore'),
    maxItems = 5,
    hiddenClass = "hidden";

[].forEach.call(items, function(item, idx){
    if (idx > maxItems ) {
        item.classList.add(hiddenClass);
    }
});

//on button click load related data
if(loadMoreBtn !== null){
    loadMoreBtn.addEventListener('click', function(){
        [].forEach.call(document.querySelectorAll('.' + hiddenClass), function(item, idx){
            console.log(item);
            if (idx < maxItems) {
                item.classList.remove(hiddenClass);
            }
            if ( document.querySelectorAll('.' + hiddenClass).length === 0) {
                loadMoreBtn.style.display = 'none';
            }
        });
    });
}
<commit_msg>remove unnecessary console log line<commit_after>//cache params
var parent = document.querySelector('#logHistory'),
    items  = parent.querySelectorAll('.history-log-wrap'),
    loadMoreBtn =  document.querySelector('#loadMore'),
    maxItems = 5,
    hiddenClass = "hidden";

[].forEach.call(items, function(item, idx){
    if (idx > maxItems ) {
        item.classList.add(hiddenClass);
    }
});

//on button click load related data
if(loadMoreBtn !== null){
    loadMoreBtn.addEventListener('click', function(){
        [].forEach.call(document.querySelectorAll('.' + hiddenClass), function(item, idx){
            if (idx < maxItems) {
                item.classList.remove(hiddenClass);
            }
            if ( document.querySelectorAll('.' + hiddenClass).length === 0) {
                loadMoreBtn.style.display = 'none';
            }
        });
    });
}

{'fraction_non_alphanumeric': 0.15139442231075698, 'fraction_numerical': 0.0022766078542970974, 'mean_word_length': 2.6098562628336754, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7195591', 'n_tokens_mistral': 483, 'n_tokens_neox': 488, 'n_words': 93}