<commit_before>function error() {
    alert("YOU HAZ ERRORS");
    debugger;
}
function hideLoadingScreen() {
    document.getElementById("loadingElement").style.display = "none";
}
$(function () { return hideLoadingScreen(); });
var animations = [
    "spin",
    "zoom",
    "bg",
    "invert",
    "blur",
    "rainbow"
];
function displayLoadingScreen() {
    var animationToUse = animations[Math.floor(Math.random() * animations.length)];
    document.getElementById("loadingElement").style.display = "block";
    document.getElementById("loadingTrollFaceScreen").style.animationName = animationToUse;
}
var pusher;
$(function () {
    pusher = new Pusher($('meta[name="pusher"]').attr('content'), {
        cluster: "eu"
    });
});
function getImages(query) {
    displayLoadingScreen();
    $.post({
        url: "/lol",
        data: {
            text: query
        }
    }).done(function (httpDataStr) {
        var httpData = JSON.parse(httpDataStr);
        if (httpData["error"] != undefined) {
            error();
        }
        var channel = pusher.subscribe(httpData.data.task);
        channel.bind("lol", function (pusherData) {
            var imageCont = document.createElement("div");
            pusherData.message.ids.forEach(function (id) {
                var newImage = document.createElement("img");
                newImage.src = "result/" + id;
                imageCont.appendChild(newImage);
            });
            document.getElementById("downloadedImageOuter").replaceChild(document.getElementById("downloadedImageInner"), imageCont)
            hideLoadingScreen();
        });
    }).fail(function (error) {
        error();
    });
}
function postForm() {
    if (document.getElementById("inputBox").value != "") {
        getImages(document.getElementById("inputBox").value);
    }
    else {
        alert("Enter a value");
    }
}
<commit_msg>Updated replaceChild with correct parameter order<commit_after>function error() {
    alert("YOU HAZ ERRORS");
    debugger;
}
function hideLoadingScreen() {
    document.getElementById("loadingElement").style.display = "none";
}
$(function () { return hideLoadingScreen(); });
var animations = [
    "spin",
    "zoom",
    "bg",
    "invert",
    "blur",
    "rainbow"
];
function displayLoadingScreen() {
    var animationToUse = animations[Math.floor(Math.random() * animations.length)];
    document.getElementById("loadingElement").style.display = "block";
    document.getElementById("loadingTrollFaceScreen").style.animationName = animationToUse;
}
var pusher;
$(function () {
    pusher = new Pusher($('meta[name="pusher"]').attr('content'), {
        cluster: "eu"
    });
});
function getImages(query) {
    displayLoadingScreen();
    $.post({
        url: "/lol",
        data: {
            text: query
        }
    }).done(function (httpDataStr) {
        var httpData = JSON.parse(httpDataStr);
        if (httpData["error"] != undefined) {
            error();
        }
        var channel = pusher.subscribe(httpData.data.task);
        channel.bind("lol", function (pusherData) {
            var imageCont = document.createElement("div");
            pusherData.message.ids.forEach(function (id) {
                var newImage = document.createElement("img");
                newImage.src = "result/" + id;
                imageCont.appendChild(newImage);
            });
            document.getElementById("downloadedImageOuter").replaceChild(imageCont, document.getElementById("downloadedImageInner"))
            hideLoadingScreen();
        });
    }).fail(function (error) {
        error();
    });
}
function postForm() {
    if (document.getElementById("inputBox").value != "") {
        getImages(document.getElementById("inputBox").value);
    }
    else {
        alert("Enter a value");
    }
}

{'fraction_non_alphanumeric': 0.15279958137100993, 'fraction_numerical': 0.0, 'mean_word_length': 2.755402750491159, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4284576', 'n_tokens_mistral': 1057, 'n_tokens_neox': 1044, 'n_words': 185}