<commit_before>var lastAjxOpt = null;

$(document).ready(function()
{
    $(document).on('click', '.pagination a', function()
    {
        ajaxContent($(this).attr('href'), ".ajax-content", null, true);

        return false;
    });

    $(document).on('change', '.table tbody tr td input:checkbox', function()
    {
        var parent = $(this).parents('.table'); 
        if(parent.find("tbody tr td input:checkbox:checked").length >= 1)
        {
            $('#delete-item').css('display', 'inline-block');
        }
        else
        {
             $('#delete-item').hide();
        }
    });

    $(document).on('change', '.check-all', function()
    {
        var parent = $(this).parents('.table');
        if($(this).is(':checked'))
        {
            parent.find("tbody tr td input:checkbox").prop('checked', true);
            $('#delete-item').css('display', 'inline-block');
        }
        else
        {
            parent.find("tbody > tr > td > input:checkbox").prop("checked", false);
            $('#delete-item').hide();
        }
    });
});

var ajaxContent = function(url, content, options, useSave)
{
    // console.log(options);
    // console.log(lastAjxOpt);
    alert(useSave);
    if(lastAjxOpt != null && useSave === true)
    {
        options = lastAjxOpt;
        lastAjxOpt = null;
    }

    // console.log(lastAjxOpt);
    $.ajax(
    {
        url: url,
        type: "GET",
        datatype: "html",
        data: options<commit_msg>[Ugp] delete javascript debug<commit_after>var lastAjxOpt = null;

$(document).ready(function()
{
    $(document).on('click', '.pagination a', function()
    {
        ajaxContent($(this).attr('href'), ".ajax-content", null, true);

        return false;
    });

    $(document).on('change', '.table tbody tr td input:checkbox', function()
    {
        var parent = $(this).parents('.table'); 
        if(parent.find("tbody tr td input:checkbox:checked").length >= 1)
        {
            $('#delete-item').css('display', 'inline-block');
        }
        else
        {
             $('#delete-item').hide();
        }
    });

    $(document).on('change', '.check-all', function()
    {
        var parent = $(this).parents('.table');
        if($(this).is(':checked'))
        {
            parent.find("tbody tr td input:checkbox").prop('checked', true);
            $('#delete-item').css('display', 'inline-block');
        }
        else
        {
            parent.find("tbody > tr > td > input:checkbox").prop("checked", false);
            $('#delete-item').hide();
        }
    });
});

var ajaxContent = function(url, content, options, useSave)
{
    if(lastAjxOpt != null && useSave === true)
    {
        options = lastAjxOpt;
        lastAjxOpt = null;
    }

    $.ajax(
    {
        url: url,
        type: "GET",
        datatype: "html",
        data: options
{'fraction_non_alphanumeric': 0.19358214161144052, 'fraction_numerical': 0.0006975933031042902, 'mean_word_length': 2.038135593220339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1061232', 'n_tokens_mistral': 869, 'n_tokens_neox': 857, 'n_words': 160}