PageSourceSearch

https://americanvegan.org/wp-content/plugins/mage-eventpress/js/mp_event_custom_script.js?ver=1790279886

js americanvegan.org collected 2026-09-24 20:20:22 UTC 3,038 bytes, 72 lines download raw bytes

1function mp_event_wo_commerce_price_format(price) {
2    let currency_position = jQuery('input[name="currency_position"]').val();
3    let currency_symbol = jQuery('input[name="currency_symbol"]').val();
4    let currency_decimal = jQuery('input[name="currency_decimal"]').val();
5    let currency_thousands_separator = jQuery('input[name="currency_thousands_separator"]').val();
6    let currency_number_of_decimal = jQuery('input[name="currency_number_of_decimal"]').val();
7    let price_text = '';
8
9    price = price.toFixed(currency_number_of_decimal);
10// console.log('price= '+ price);
11    let total_part = price.toString().split(".");
12    total_part[0] = total_part[0].replace(/\B(?=(\d{3})+(?!\d))/g, currency_thousands_separator);
13    price = total_part.join(currency_decimal);
14
15    if (currency_position === 'right') {
16        price_text = price + currency_symbol;
17    } else if (currency_position === 'right_space') {
18        price_text = price + ' ' + currency_symbol;
19    } else if (currency_position === 'left') {
20        price_text = currency_symbol + price;
21    } else {
22        price_text = currency_symbol + ' ' + price;
23    }
24	// console.log('price= '+ price_text);
25    return price_text;
26}
27(function ($) {
28//added by sumon
29    $(document).on('click', '.mep-event-list-loop .mp_event_visible_event_time', function (e) {
30        e.preventDefault();
31        let target = $(this);
32        $('.mep-event-list-loop .mp_event_visible_event_time').each(function () {
33            let current=$(this).siblings('ul.mp_event_more_date_list');
34            if(current.is(':visible')){
35                let active_text=$(this).data('active-text');
36                $(this).html(active_text);
37                current.slideUp(200);
38            }
39
40        }).promise().done(function () {
41            let current_list=target.siblings('ul.mp_event_more_date_list');
42            if(current_list.length>0){
43                if(current_list.is(':visible')){
44                    current_list.slideUp(200);
45                    target.html(target.data('active-text'));
46                }else{
47                    current_list.slideDown(200);
48                    target.html(target.data('hide-text'));
49                }
50            }else{
51                let event_id = target.data('event-id');
52                $.ajax({
53                    type: 'POST',
54                    url: ajaxurl,
55                    data: {"action": "mep_event_list_date_schedule", "event_id":event_id},
56                    beforeSend: function(){
57                        target.html('<span class="fas fa-spinner fa-pulse"></span>');
58                    },
59                    success: function(data){
60                        $(data).insertAfter(target);
61                        target.html(target.data('hide-text'));
62                    }
63                });
64            }
65
66
67        });
68    });
69	$(document).on('click', 'button.mep_view_vr_btn', function () {
70        $(this).closest('tr').next('tr.mep_virtual_event_info_sec').slideToggle('fast');
71    });
72}(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.