PageSourceSearch

https://www.ancom.ro/wp-content/themes/hello-elementor-child/assets/js/museum.js?ver=1.3

js ancom.ro collected 2026-10-02 04:19:34 UTC 3,722 bytes, 94 lines download raw bytes

1jQuery(document).ready(function($) {
2    console.log('Museum JS loaded v1.3 - Capture Phase');
3
4    // Create the popup container if it doesn't exist
5    if ($('#museum-iframe-popup').length === 0) {
6        $('body').append(`
7            <div id="museum-iframe-popup" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:999999;">
8                <div style="position:relative; width:90%; height:90%; margin: 2.5% auto; background:#fff; box-shadow: 0 0 15px rgba(0,0,0,0.5);">
9                    <button class="close-popup" style="position:absolute; top:-15px; right:-15px; cursor:pointer; border:none; background:red; color:white; border-radius:50%; width:30px; height:30px; font-weight:bold; line-height:30px; text-align:center; z-index:1000;">&times;</button>
10                    <iframe src="" style="width:100%; height:100%; border:none;"></iframe>
11                </div>
12            </div>
13        `);
14
15        // Close popup on click
16        $(document).on('click', '#museum-iframe-popup .close-popup', function() {
17            $('#museum-iframe-popup').fadeOut();
18            $('#museum-iframe-popup iframe').attr('src', ''); // Clear src to stop video/audio if any
19        });
20
21        // Close on click outside
22        $(document).on('click', '#museum-iframe-popup', function(e) {
23            if (e.target === this) {
24                $(this).fadeOut();
25                $('#museum-iframe-popup iframe').attr('src', '');
26            }
27        });
28    }
29
30   $(document).on('click', '.tag-muzeu-virtual a', function(e) {
31      e.preventDefault();
32      e.stopPropagation();
33
34      // Find the closest anchor tag with class 'iframe'
35      var target = e.target.closest('a');
36      
37      if (target) {
38         console.log('Captured click on a.iframe');
39         e.preventDefault();
40         e.stopPropagation();
41         
42         var url = target.getAttribute('href');
43         console.log('URL:', url);
44         
45         if (url) {
46            var popup = document.getElementById('museum-iframe-popup');
47            if (popup) {
48                  var iframe = popup.querySelector('iframe');
49                  if (iframe) {
50                     iframe.src = url;
51                  }
52                  // Use jQuery for fade in if available, or just display block
53                  if (window.jQuery) {
54                     window.jQuery('#museum-iframe-popup').fadeIn();
55                  } else {
56                     popup.style.display = 'block';
57                  }
58            }
59         }
60      }
61   });
62   
63});
64
65// Use vanilla JS with capture phase to ensure we catch the click first
66// document.addEventListener('click', function(e) {
67//     // Find the closest anchor tag with class 'iframe'
68//     var target = e.target.closest('a.iframe');
69    
70//     if (target) {
71//         console.log('Captured click on a.iframe');
72//         e.preventDefault();
73//         e.stopPropagation();
74        
75//         var url = target.getAttribute('href');
76//         console.log('URL:', url);
77        
78//         if (url) {
79//             var popup = document.getElementById('museum-iframe-popup');
80//             if (popup) {
81//                 var iframe = popup.querySelector('iframe');
82//                 if (iframe) {
83//                     iframe.src = url;
84//                 }
85//                 // Use jQuery for fade in if available, or just display block
86//                 if (window.jQuery) {
87//                     window.jQuery('#museum-iframe-popup').fadeIn();
88//                 } else {
89//                     popup.style.display = 'block';
90//                 }
91//             }
92//         }
93//     }
94// }, true); // true = capture phase

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.