PageSourceSearch

https://ultrarunning.com/wp-content/themes/soledad/js/widgets-ajax.js?ver=8.7.6

js ultrarunning.com collected 2026-09-24 08:50:00 UTC 3,513 bytes, 98 lines download raw bytes

1(function ($) {
2    "use strict";
3    var PENCI = PENCI || {};
4    PENCI.ajaxwidgets = function () {
5        $(document).on('click', '.widget .penci-wgajx-btn', function (e) {
6            e.preventDefault();
7            var t = $(this),
8                wrapper = t.closest('.widget').find('ul'),
9                navwrapper = t.closest('.penci-pagination'),
10                settings = wrapper.attr('data-settings'),
11                mes = wrapper.attr('data-mes'),
12                action = wrapper.data('action'),
13                id = parseInt(wrapper.data('id')),
14                max = parseInt(wrapper.data('max')),
15                nav = t.hasClass('pcajx-btn'),
16                paged = parseInt(wrapper.attr('data-paged')),
17                type = wrapper.attr('data-type'),
18                get_paged = paged + 1;
19
20            if (t.hasClass('disable')) {
21                return;
22            }
23
24            if (t.hasClass('pc-tabsajax-btn')) {
25                wrapper = t.closest('.tab-content-wrapper').find('ul');
26                settings = wrapper.attr('data-settings');
27                type = wrapper.attr('data-type');
28                mes = wrapper.attr('data-mes');
29                paged = parseInt(wrapper.attr('data-paged'));
30                max = parseInt(wrapper.data('max'));
31                action = wrapper.data('action');
32                get_paged = paged + 1;
33            }
34
35            if (nav && t.hasClass('prev')) {
36                get_paged = paged - 1;
37            }
38
39            t.addClass('loading-posts');
40            wrapper.closest(".widget").addClass('ajx-loading');
41
42            $.ajax({
43                type: "POST",
44                dataType: "html",
45                url: penci_widgets_ajax.url,
46                data: {
47                    action: action,
48                    settings: settings,
49                    id: id ? id : '',
50                    type: type ? type : '',
51                    paged: get_paged,
52                    nonce: penci_widgets_ajax.nonce,
53                },
54                success: function (data) {
55
56                    if (data) {
57
58                        if (nav && get_paged >= max) {
59                            navwrapper.find('.pcajx-btn.next').addClass('disable');
60                        } else {
61                            navwrapper.find('.pcajx-btn.next').removeClass('disable');
62                        }
63
64                        if (nav && get_paged > 1) {
65                            navwrapper.find('.pcajx-btn.prev').removeClass('disable');
66                        } else {
67                            navwrapper.find('.pcajx-btn.prev').addClass('disable');
68                        }
69
70                        var datajs = $(data);
71
72                        if (nav) {
73                            wrapper.empty();
74                        }
75
76                        wrapper.append(datajs.html());
77
78                        wrapper.attr('data-paged', get_paged);
79
80                    } else {
81
82                        t.find(".ajax-more-text").text(mes);
83                        t.find("i").remove();
84                        setTimeout(function () {
85                            t.closest('.penci-pagination').remove();
86                        }, 1200);
87                    }
88                    t.removeClass('loading-posts');
89                    wrapper.closest(".widget").removeClass('ajx-loading');
90                }
91            });
92        });
93    };
94
95    $(document).ready(function () {
96        PENCI.ajaxwidgets();
97    });
98})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.