1/** 2 * Boutons flottants (.fabw) â version globale (toutes les pages). 3 * Toggle (+) déploie/replie les réseaux + bouton back-to-top (apparaît >480px). 4 * Autonome (vanilla), aucune dépendance. Chargé via wp_enqueue_scripts. 5 */ 6(function () { 7 function init() { 8 var w = document.getElementById('fabw'), 9 tg = document.getElementById('fabToggle'), 10 bt = document.getElementById('fabBackTop'); 11 if (!w) return; 12 if (tg) { 13 tg.addEventListener('click', function (e) { 14 e.stopPropagation(); 15 var op = w.classList.toggle('open'); 16 tg.setAttribute('aria-expanded', op); 17 }); 18 } 19 if (bt) { 20 bt.addEventListener('click', function () { 21 window.scrollTo({ top: 0, behavior: 'smooth' }); 22 }); 23 } 24 function onScroll() { 25 if (window.scrollY > 480) { w.classList.add('show-top'); } 26 else { w.classList.remove('show-top'); } 27 } 28 window.addEventListener('scroll', onScroll, { passive: true }); 29 onScroll(); 30 } 31 if (document.readyState === 'loading') { 32 document.addEventListener('DOMContentLoaded', init); 33 } else { 34 init(); 35 } 36})();
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.