Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

I wnt to get this script to work with utocontrol (it mkes scrolling down to section of website

23 views
Skip to first unread message

Karim Aberkaoui

unread,
Mar 15, 2025, 4:57:37 AMMar 15
to AutoControl Community Forum
// Fonction pour naviguer vers la section spécifique
function scrollToSection() {
    // Chercher l'élément contenant le texte "4.1. Indications thérapeutiques"
    const section = Array.from(document.querySelectorAll('h2, h3, h4')) // Vous pouvez ajuster les balises selon la structure HTML du site
        .find(element => element.textContent.trim() === '4.1. Indications thérapeutiques');
   
    // Si la section est trouvée, faire défiler jusqu'à elle
    if (section) {
        section.scrollIntoView({ behavior: 'smooth', block: 'start' });
    } else {
        console.log('Section non trouvée');
    }
}

// Appeler la fonction pour se rendre à la section
scrollToSection();

AutoControl support

unread,
Mar 21, 2025, 12:37:07 AMMar 21
to AutoControl Community Forum
You don't need to change anything in the script. Just paste the code into the "RUN SCRIPT" action as shown below, then assign a trigger to it (F1 in the example).
image.png

Reply all
Reply to author
Forward
0 new messages