PageSourceSearch

https://www.backsplash.com/wp-content/plugins/woocommerce-bulk-ups…/js/wbuac-front-popup.js?ver=646a65170255

js backsplash.com collected 2026-09-25 23:39:25 UTC 4,015 bytes, 98 lines download raw bytes

1( function( $ ) {
2    "use strict";
3
4    $( function() {
5
6        let wbuac_modal = {
7            init: function( content ) {
8                $( document ).on( 'click keyup', this.close );
9
10                let append_block = $( 'body' );
11
12                $( 'html, body' ).addClass( 'wbuac-stop_scroll' );
13
14                let modal = $(
15                    '<div class="wbuac-modal">' +
16                        '<div class="wbuac-modal_background">' +
17                            '<div class="wbuac-modal_wrap">' +
18                                '<div class="wbuac-modal_content">' +
19                                    '<div class="wbuac-close_modal">' +
20                                        '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabIndex="-1">' +
21                                            '<path d="M0 0L24 24M0 24L24 0"></path>' +
22                                        '</svg>' +
23                                    '</div>' +
24                                    content +
25                                '</div>' +
26                            '</div>' +
27                        '</div>' +
28                    '</div>'
29                );
30
31                append_block.append( modal );
32
33                if( modal.find( '.wbuac-carousel.wbuac-products' ).length ) {
34
35                    const wbuac_swiper = new Swiper('.wbuac-carousel.wbuac-products', {
36                        navigation: {
37                            nextEl: '.swiper-button-next',
38                            prevEl: '.swiper-button-prev',
39                        },
40                        slidesPerView: 2,
41                        spaceBetween: 20,
42                        effect: 'carousel',
43                        breakpoints: {
44                            480: {
45                                slidesPerView: 3,
46                                spaceBetween: 20,
47                            },
48                            680: {
49                                slidesPerView: 3,
50                                spaceBetween: 30,
51                            }
52                        }
53                    });
54
55                }
56
57                setTimeout( function() {
58                    $( '.wbuac-modal' ).addClass( 'wbuac-modal_animated' );
59                }, 50 );
60            },
61            close: function( e ) {
62                let popup = $( '.wbuac-modal:last' );
63                if( !popup.length ) return;
64                let close = popup.find( '.wbuac-close_modal' );
65                let length_modal = $( '.wbuac-modal').length;
66
67                if( ( e.type === 'keyup' && e.key === "Escape" ) ||
68                    ( e.type === 'click' && ( popup.is( e.target ) || $( '.wbuac-modal_background' ).is( e.target ) || $( '.wbuac-modal_wrap' ).is( e.target ) ) ) ||
69                    ( e.type === 'click' && ( close.is( e.target ) || close.has( e.target ).length ) ) ) {
70
71                    popup.removeClass( 'wbuac-modal_animated' );
72
73                    if( length_modal < 2 ) {
74                        $( document ).unbind( 'click keyup', wbuac_modal.close );
75                    }
76
77                    setTimeout( function() {
78                        if( length_modal < 2 ) {
79                            $( 'html, body' ).removeClass( 'wbuac-stop_scroll' );
80                        }
81                        popup.remove();
82                    }, 300 );
83                }
84            }
85        }
86
87        $( 'body' ).on( 'added_to_cart', function( event, fragments, cart_hash ) {
88            if( typeof fragments.wbuac_linked != 'undefined' ) {
89                wbuac_modal.init( fragments.wbuac_linked );
90            }
91        });
92
93        if( typeof wbuac_popup_js_data.popup_content.wbuac_linked != 'undefined' && wbuac_popup_js_data.popup_content.wbuac_linked !== '' ) {
94            wbuac_modal.init( wbuac_popup_js_data.popup_content.wbuac_linked );
95        }
96    });
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.