PageSourceSearch

https://humanoseguros.com/wp-content/themes/humano-seguros/js/elementor-tabs-h3.js

js humanoseguros.com collected 2026-10-02 04:16:54 UTC 1,927 bytes, 56 lines download raw bytes

1/**
2 * Convierte los títulos de las pestañas de Elementor a etiquetas H3
3 * para mejorar la semántica y SEO
4 */
5(function() {
6    'use strict';
7    
8    // Set para rastrear elementos ya convertidos
9    const convertedElements = new WeakSet();
10    
11    function convertTabTitlesToH3() {
12        // Buscar solo los span con la clase específica que no han sido convertidos
13        const tabTitles = document.querySelectorAll('.e-n-tabs-heading span.e-n-tab-title-text');
14        
15        if (tabTitles.length === 0) return;
16        
17        tabTitles.forEach(function(span) {
18            // Saltar si ya fue convertido
19            if (convertedElements.has(span)) return;
20            
21            // Marcar como convertido
22            convertedElements.add(span);
23            
24            // Crear un nuevo elemento h3
25            const h3 = document.createElement('h3');
26            
27            // Copiar la clase
28            h3.className = span.className;
29            
30            // Copiar otros atributos si existen
31            if (span.hasAttributes()) {
32                Array.from(span.attributes).forEach(function(attr) {
33                    if (attr.name !== 'class') {
34                        h3.setAttribute(attr.name, attr.value);
35                    }
36                });
37            }
38            
39            // Copiar el contenido
40            h3.innerHTML = span.innerHTML;
41            
42            // Reemplazar el span con el h3
43            span.parentNode.replaceChild(h3, span);
44        });
45    }
46    
47    // Ejecutar una sola vez cuando el DOM esté completamente cargado
48    if (document.readyState === 'loading') {
49        document.addEventListener('DOMContentLoaded', function() {
50            // Pequeño delay para asegurar que Elementor haya terminado de renderizar
51            setTimeout(convertTabTitlesToH3, 50);
52        });
53    } else {
54        setTimeout(convertTabTitlesToH3, 50);
55    }
56})();

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.