1// Capitalise la première lettre du nom d'utilisateur une fois mis à jour dynamiquement 2const usernameEl = document.getElementById('username'); 3if (usernameEl) { 4 const observer = new MutationObserver(() => { 5 const txt = usernameEl.textContent.trim(); 6 if (txt && txt !== 'Utilisateur') { 7 usernameEl.textContent = txt.charAt(0).toUpperCase() + txt.slice(1); 8 observer.disconnect(); // stop observing 9 } 10 }); 11 12 observer.observe(usernameEl, { childList: true, subtree: true }); 13 14 // Fallback si déjà présent 15 const txt = usernameEl.textContent.trim(); 16 if (txt && txt !== 'Utilisateur') { 17 usernameEl.textContent = txt.charAt(0).toUpperCase() + txt.slice(1); 18 } 19}
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.