1(function () { 2 const root = document.getElementById('cyber17-widget'); 3 const fab = document.getElementById('cyber17-fab'); 4 const panel = document.getElementById('cyber17-panel'); 5 const closeBtn = document.getElementById('cyber17-close'); 6 7 if (!root || !fab || !panel || !closeBtn) return; 8 9 const open = () => { 10 root.setAttribute('aria-expanded', 'true'); 11 fab.setAttribute('aria-expanded', 'true'); 12 // Focus dans le panneau pour lâaccessibilité 13 panel.setAttribute('tabindex', '-1'); 14 panel.focus({ preventScroll: true }); 15 }; 16 const close = () => { 17 root.setAttribute('aria-expanded', 'false'); 18 fab.setAttribute('aria-expanded', 'false'); 19 }; 20 21 22 fab.addEventListener('click', () => { 23 const isOpen = root.getAttribute('aria-expanded') === 'true'; 24 if (isOpen) { close(); } else { open(); } 25 }); 26 closeBtn.addEventListener('click', close); 27 28 29 // Fermer avec Ãchap 30 document.addEventListener('keydown', (e) => { 31 if (e.key === 'Escape') close(); 32 }); 33 34 35 // Cliquer en dehors pour fermer 36 document.addEventListener('click', (e) => { 37 if (!root.contains(e.target) && root.getAttribute('aria-expanded') === 'true') close(); 38 }); 39 40 })();
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.