<commit_before>$(document).ready(function(){
    $(".navi_tab").livequery('click',function(){
        $(".navi_tab").removeClass("tab_active").addClass("tab_inactive");
        $(this).removeClass("tab_inactive").addClass("tab_active");
        $("#main > div:visible").hide();

        var tab_id = $(this).attr("id");
        var tab_str = tab_id.substr(0,tab_id.length-4);
        $('#'+tab_str+'_body').show();
        ACTIVE_REGION = REGIONS.indexOf(tab_str);

        if (tab_str == "settings")
            $(".machine-control").hide();
        else
            $(".machine-control").show();
    });

    $(".order-machine-add-button").livequery('click', function(){
            var modvar = $(this).prev().val();
            var modname = $(this).prev().children("option:selected").html();
            var total_forms = $('#id_'+modvar+'-TOTAL_FORMS');
            var last_id = parseInt(total_forms.val()) - 1;
            var form = $("#"+modvar+"_set_item_"+last_id);

            total_forms.val(last_id+2);
            form.children(".region-choice-field").val(REGION_MAP[ACTIVE_REGION]);

            create_new_from_form(form, modvar, last_id);
            region_append(ACTIVE_REGION, form, modname, modvar);

            $(this).parent().parent().siblings(".empty-machine-msg").hide();
    });

    $(".order-machine-move-button").livequery('click', function(){
            var moveTo = $(this).prev().val();
            move_item(REGIONS.indexOf(moveTo),$(".active-item"));

            $("#"+moveTo+"_body").children(".empty-machine-msg").hide();<commit_msg>Call init_pagecontent() when new page content blocks have been added<commit_after>$(document).ready(function(){
    $(".navi_tab").livequery('click',function(){
        $(".navi_tab").removeClass("tab_active").addClass("tab_inactive");
        $(this).removeClass("tab_inactive").addClass("tab_active");
        $("#main > div:visible").hide();

        var tab_id = $(this).attr("id");
        var tab_str = tab_id.substr(0,tab_id.length-4);
        $('#'+tab_str+'_body').show();
        ACTIVE_REGION = REGIONS.indexOf(tab_str);

        if (tab_str == "settings")
            $(".machine-control").hide();
        else
            $(".machine-control").show();
    });

    $(".order-machine-add-button").livequery('click', function(){
            var modvar = $(this).prev().val();
            var modname = $(this).prev().children("option:selected").html();
            var total_forms = $('#id_'+modvar+'-TOTAL_FORMS');
            var last_id = parseInt(total_forms.val()) - 1;
            var form = $("#"+modvar+"_set_item_"+last_id);

            total_forms.val(last_id+2);
            form.children(".region-choice-field").val(REGION_MAP[ACTIVE_REGION]);

            create_new_from_form(form, modvar, last_id);
            region_append(ACTIVE_REGION, form, modname, modvar);

            $(this).parent().parent().siblings(".empty-machine-msg").hide();

            init_pagecontent();
    });

    $(".order-machine-move-button").livequery('click', function(){
            var moveTo = $(this).prev().val();
            move_item(REGIONS.indexOf(moveTo),$(".active-item"));

            $("#"+moveTo+"_body").children(".empty-machine-msg").hide();
{'fraction_non_alphanumeric': 0.20709876543209876, 'fraction_numerical': 0.0024691358024691358, 'mean_word_length': 2.83096926713948, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6311883', 'n_tokens_mistral': 972, 'n_tokens_neox': 970, 'n_words': 121}