<commit_before>/*
 * This plug-in adds another pagination option similar to full_numbers,
 * except it adds ellipses around the page numbers when applicable.
 * You can set how many page numbers should be displayed with the iShowPages option.
 * This plug-in extends the oStdClasses object with the following properties:
 * sPageEllipsis, sPageNumber and sPageNumbers.
 * It also extends the oSettings object with the following properties:
 * _iShowPages, _iShowPagesHalf, _iCurrentPage, _iTotalPages, _iFirstPage and _iLastPage.
 *
 * @name Ellipses
 * @anchor ellipses
 * @author <a href="http://daveden.wordpress.com/"><NAME></a>
 * @example
 *     $('#my-table').dataTable({
 *         // Optional usage of extended oSettings object
 *         'fnInfoCallback': function(oSettings) {
 *             // Update stateful properties
 *             $.fn.dataTableExt.oPagination.ellipses.fnUpdateState(oSettings);
 *             return 'Viewing page ' + oSettings._iCurrentPage + ' of ' + oSettings._iTotalPages;
 *         },
 *         // Optional usage of iShowPages option
 *         'iShowPages': 15,
 *         // This is the only required option
 *         'sPaginationType': 'ellipses'
 *     });
 */

$.extend($.fn.dataTableExt.oStdClasses, {
    'sPageEllipsis': 'paginate_ellipsis',
    'sPageNumber': 'paginate_number',
    'sPageNumbers': 'paginate_numbers'
});

$.fn.dataTableExt.oPagination.ellipses = {
    'oDefaults': {
        'iShowPages': 5
    },
    'fnClickHandler': function(e) {
        var fnCallbackDraw = e.data.fnCallbackDraw,
            oSettings = e.data.oSettings,
            sPage = e.data.sPage;

        if ($(this).is('[disabled]')) {
            return false;
        }

        oSettings.oApi._fnPageChange(oSettings, sPage);
        fnCallbackDraw(oSettings);

        return true;
    },<commit_msg>Simplified example<commit_after>/*
 * This plug-in adds another pagination option similar to full_numbers,
 * except it adds ellipses around the page numbers when applicable.
 * You can set how many page numbers should be displayed with the iShowPages option.
 * This plug-in extends the oStdClasses object with the following properties:
 * sPageEllipsis, sPageNumber and sPageNumbers.
 * It also extends the oSettings object with the following properties:
 * _iShowPages, _iShowPagesHalf, _iCurrentPage, _iTotalPages, _iFirstPage and _iLastPage.
 *
 * @name Ellipses
 * @anchor ellipses
 * @author <a href="http://daveden.wordpress.com/"><NAME></a>
 * @example
 *     $(document).ready(function() {
 *         $('#example').dataTable({
 *             'sPaginationType': 'ellipses'
 *         });
 *     });
 */

$.extend($.fn.dataTableExt.oStdClasses, {
    'sPageEllipsis': 'paginate_ellipsis',
    'sPageNumber': 'paginate_number',
    'sPageNumbers': 'paginate_numbers'
});

$.fn.dataTableExt.oPagination.ellipses = {
    'oDefaults': {
        'iShowPages': 5
    },
    'fnClickHandler': function(e) {
        var fnCallbackDraw = e.data.fnCallbackDraw,
            oSettings = e.data.oSettings,
            sPage = e.data.sPage;

        if ($(this).is('[disabled]')) {
            return false;
        }

        oSettings.oApi._fnPageChange(oSettings, sPage);
        fnCallbackDraw(oSettings);

        return true;
    },
{'fraction_non_alphanumeric': 0.11850946854001222, 'fraction_numerical': 0.0012217470983506415, 'mean_word_length': 2.912783751493429, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5073136', 'n_tokens_mistral': 1006, 'n_tokens_neox': 974, 'n_words': 243}