PageSourceSearch

https://www.dlocal.com/assets/js/fixed/popup-fixed.js?v=89

js dlocal.com collected 2026-10-01 08:36:27 UTC 1,765 bytes, 75 lines download raw bytes

1/* ***** FUNCIONES ***** */
2
3(function() {
4
5const $allPopups = document.querySelectorAll('.js-popup-fixed');
6const $body = document.querySelector('body');
7const $btnOpenPopup = document.querySelectorAll('.js-showPopupFixed');
8
9$btnOpenPopup.forEach(($btn) => {
10
11    $btn.addEventListener('click', (event) => {
12        event.preventDefault();
13        const btnPopupClass = $btn.getAttribute('data-popup');
14        popupInit(btnPopupClass, $btn);
15    });
16
17});
18
19function popupInit(popupClass, $btn) {
20    const $popup = document.querySelectorAll('.' + popupClass)[0];
21    const $popupClose = $popup.querySelectorAll('.js-popup-close');
22    const $popupOverlay = $popup.querySelectorAll('.js-popup__overlay')[0];
23
24    showPopup($popup, $btn);
25
26
27    $popupClose.forEach(($btnClose) => {
28
29        $btnClose.onclick = () => {
30            hidePopup($popup, $popupOverlay);
31        };
32
33    });
34
35    if($popupOverlay){
36        $popupOverlay.onclick = () => {
37        hidePopup($popup, $popupOverlay);
38    };
39    }
40
41
42}
43
44
45function showPopup($popup, $btn) {
46
47    
48    //Hide all popups
49    $allPopups.forEach(($prevPopup) => {
50
51        if ($prevPopup.classList.contains('is-open')) {
52            hidePopup($prevPopup);
53        }
54
55    });
56
57    $body.classList.add('u-block-scroll');
58    $popup.classList.add('is-active', 'is-visible');
59
60}
61
62function hidePopup($popup, $popupOverlay) {
63
64    $popup.classList.add('is-closing');
65
66    $popupOverlay.addEventListener('animationend', function (e) {
67        if (e.target === $popupOverlay && $popup.classList.contains('is-active') && $popup.classList.contains('is-closing')) {
68            $popup.classList.remove('is-active', 'is-visible', 'is-closing');
69            $body.classList.remove('u-block-scroll');
70
71        }
72    });
73}
74
75})();

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.