PageSourceSearch

https://nata.aero/wp-content/themes/nata/js/modal.js?ver=1.0.0

js nata.aero collected 2026-09-24 09:33:21 UTC 1,315 bytes, 39 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2    // Get the modal
3    var modal = document.getElementById('custom-modal');
4
5    // Check if the modal exists
6    if (modal) {
7        // Get the <span> element that closes the modal
8        var span = document.getElementsByClassName('custom-modal-close')[0];
9
10        // Show the modal after a certain time (e.g., 2 seconds)
11        setTimeout(function() {
12            modal.style.display = 'flex';
13        }, 2000);
14
15        // Function to close the modal with animation
16        function closeModal() {
17            var modalContent = document.querySelector('.custom-modal-content');
18            modalContent.classList.add('fade-out');
19            setTimeout(function() {
20                modal.style.display = 'none';
21                modalContent.classList.remove('fade-out');
22            }, 500); // Match the duration of the fadeOut animation
23        }
24
25        // When the user clicks on <span> (x), close the modal
26        if (span) {
27            span.onclick = function() {
28                closeModal();
29            }
30        }
31
32        // When the user clicks anywhere outside of the modal, close it
33        window.onclick = function(event) {
34            if (event.target == modal) {
35                closeModal();
36            }
37        }
38    }
39});

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.