1document.addEventListener('DOMContentLoaded', () => { 2 const labels = {fr: 'Français', en: 'English', es: 'Español', de: 'Deutsch', nl: 'Nederlands', pt: 'Português', it: 'Italiano'}; 3 const updateLanguageLabels = () => { 4 document.querySelectorAll('.lang-switcher option').forEach(option => { 5 if (!option.dataset.compactLabel) option.dataset.compactLabel = option.textContent; 6 option.textContent = window.innerWidth >= 992 ? labels[option.value] || option.textContent : option.dataset.compactLabel; 7 }); 8 }; 9 updateLanguageLabels(); 10 window.addEventListener('resize', updateLanguageLabels); 11 const toggle = document.querySelector('.navbar-toggler'); 12 const menu = document.querySelector('.navbar-collapse'); 13 if (!toggle || !menu) return; 14 toggle.addEventListener('click', () => { 15 const open = menu.classList.toggle('show'); 16 toggle.setAttribute('aria-expanded', String(open)); 17 }); 18 menu.addEventListener('click', event => { 19 if (window.innerWidth >= 992 || !event.target.closest('a')) return; 20 menu.classList.remove('show'); 21 toggle.setAttribute('aria-expanded', 'false'); 22 }); 23 menu.addEventListener('keydown', event => { 24 if (event.key !== 'Escape') return; 25 menu.classList.remove('show'); 26 toggle.setAttribute('aria-expanded', 'false'); 27 toggle.focus(); 28 }); 29});
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.