PageSourceSearch

https://www.mirabilandia.it/etc.clientlibs/parques-reunidos-catalo…-800b6e834147f1e4d56e14581dd09b5c-lc.min.js

js mirabilandia.it collected 2026-10-01 13:07:33 UTC 2,409 bytes, 63 lines download raw bytes

1window.addEventListener('load', function (e) {
2
3
4    //Recorro todos los P y si tienen dentro un span, le quito el span y le asigno al P la clase y el texto que tenga el span
5    // Selecciona todos los elementos <p>
6    var paragraphs = document.querySelectorAll('p');
7
8    paragraphs.forEach(function(element) {
9        // Selecciona todos los <span> dentro del <p>
10        var spans = element.querySelectorAll('span');
11        var colorFont = spans.length;
12
13        if (colorFont > 0) {
14            var textSpan = spans[0].innerHTML; // Obtiene el contenido HTML del primer <span>
15            var nameClass = spans[0].className; // Obtiene la clase del primer <span>
16
17            // Elimina todos los <span> del <p>
18            spans.forEach(function(span) {
19                span.remove();
20            });
21
22            // Agrega la clase al <p>
23            var nameClassMultiple = nameClass.split(" ");
24            nameClassMultiple.forEach(function(cName){
25                if(cName != ""){
26                    element.classList.add(cName);                                                            
27                }
28            });
29            // Agrega el texto del <span> al <p>
30            element.insertAdjacentHTML('beforeend', textSpan);
31        }
32    });
33
34    // Agrega el evento click a los elementos con la clase 'ca04_textrich'
35    var ca04TextrichElements = document.querySelectorAll('.ca04_textrich');
36
37    ca04TextrichElements.forEach(function(element) {
38        element.addEventListener('click', function(e) {
39            var link = element.querySelector("a");
40            var hrefdiv = link ? link.getAttribute('href') : '';
41
42            // Verifica si hrefVal comienza con #
43            if (hrefdiv.startsWith('#')) {
44                // Obtiene el id del enlace
45                var id = hrefdiv.substring(1);
46                // Encuentra el elemento con ese id
47                var targetElement = document.getElementById(id);
48                if (targetElement) {
49                    // Calcula la posición del elemento
50                    var offset = targetElement.offsetTop - 160;
51                    // Realiza el desplazamiento suavemente
52                    window.scrollTo({
53                        top: offset,
54                        behavior: 'smooth'
55                    });
56                    e.preventDefault();
57                }
58            }
59        });
60    });
61    
62
63});

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.