<commit_before>var editor;
var codeobj = new Object();
var mod_controller;
var autosaveGeneration = null;

function buildResult(results, textStatus, status, jqXHR) {
    if (status !== 200) {
        console.log("Don't know what to do.  Backend failure?");
        return;
    }
    try {
        results = JSON.parse(results);
    }
    catch(e) {
        debugger;
    }
    if (results.success) {
        document.getElementById("buildoutput").innerHTML = "Build complete";

        var data = atob(results.output);
        if (mod_controller)
            mod_controller.stop();
        mod_controller = new ModulationController({
            canvas: document.getElementById("wavStrip"),
            endCallback: function() {
                document.getElementById("Site-footer").style.display = 'none';
            }
        });
        mod_controller.transcodeToAudioTag(data, document.getElementById("audio_output"), 'mp3');

        document.getElementById("Site-footer").style.display = '';
    } else {
        editor.chibi_error_string = results.message;
        editor.performLint();
    }
}

function clickUpload(e) {
    selectTab(e);
    document.getElementById("buildoutput").innerHTML = "Building code...";

    // Play empty data onclick to enable audio playback.
    var audioTag = document.getElementById("audio_output");<commit_msg>index: move back to wav<commit_after>var editor;
var codeobj = new Object();
var mod_controller;
var autosaveGeneration = null;

function buildResult(results, textStatus, status, jqXHR) {
    if (status !== 200) {
        console.log("Don't know what to do.  Backend failure?");
        return;
    }
    try {
        results = JSON.parse(results);
    }
    catch(e) {
        debugger;
    }
    if (results.success) {
        document.getElementById("buildoutput").innerHTML = "Build complete";

        var data = atob(results.output);
        if (mod_controller)
            mod_controller.stop();
        mod_controller = new ModulationController({
            canvas: document.getElementById("wavStrip"),
            endCallback: function() {
                document.getElementById("Site-footer").style.display = 'none';
            }
        });
        mod_controller.transcodeToAudioTag(data, document.getElementById("audio_output"), 'wav');

        document.getElementById("Site-footer").style.display = '';
    } else {
        editor.chibi_error_string = results.message;
        editor.performLint();
    }
}

function clickUpload(e) {
    selectTab(e);
    document.getElementById("buildoutput").innerHTML = "Building code...";

    // Play empty data onclick to enable audio playback.
    var audioTag = document.getElementById("audio_output");
{'fraction_non_alphanumeric': 0.12334315169366716, 'fraction_numerical': 0.002577319587628866, 'mean_word_length': 2.716826265389877, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5671691', 'n_tokens_mistral': 745, 'n_tokens_neox': 724, 'n_words': 157}