<commit_before>var chat_button = document.createElement("BUTTON");
chat_button.id = "chat_button";
var t = document.createTextNode("load messages");
chat_button.appendChild(t);
function chat_func() {// variable_get(["msg_peers"], chat_func2); }
//function chat_func2(peers) {
    var chat_buddy = parseInt(document.getElementById("talk_address").value, 10);
    //console.log(peers[1]);
    variable_get(["msg_ids", chat_buddy], function(x) {chat_func3(x, chat_buddy)} );
}
start = -1;
function chat_func3(ids, partner) {
    console.log(ids);
    msgs = document.getElementById("messages");
    //replacedNode = msgs.replaceChild(ul, msgs);
    //msgs.replaceChild(ul, msgs);
    while (msgs.firstChild) {
	msgs.removeChild(msgs.firstChild);
    }
    chat_func4(ids, partner, 1, ids.length);
}
function chat_func4(ids, partner, N, M) {
    console.log("chat 4");
    console.log(N);<commit_msg>fix javascript<commit_after>var chat_button = document.createElement("BUTTON");
chat_button.id = "chat_button";
var t = document.createTextNode("load messages");
chat_button.appendChild(t);
function chat_func() {// variable_get(["msg_peers"], chat_func2); }
//function chat_func2(peers) {
    start = -1;
    var chat_buddy = parseInt(document.getElementById("talk_address").value, 10);
    //console.log(peers[1]);
    variable_get(["msg_ids", chat_buddy], function(x) {chat_func3(x, chat_buddy)} );
}
function chat_func3(ids, partner) {
    console.log(ids);
    msgs = document.getElementById("messages");
    //replacedNode = msgs.replaceChild(ul, msgs);
    //msgs.replaceChild(ul, msgs);
    while (msgs.firstChild) {
	msgs.removeChild(msgs.firstChild);
    }
    chat_func4(ids, partner, 1, ids.length);
}
function chat_func4(ids, partner, N, M) {
    console.log("chat 4");
    console.log(N);
{'fraction_non_alphanumeric': 0.16471897607122982, 'fraction_numerical': 0.01335559265442404, 'mean_word_length': 4.993333333333333, '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': '1949298', 'n_tokens_mistral': 631, 'n_tokens_neox': 622, 'n_words': 108}