Spaces:
Running
Running
Download script.js from dadif22/database-whisperer: direct link, hf CLI and curl.
- Browser
- Download file 801 Bytes
-
https://huggingface.co/spaces/dadif22/database-whisperer/resolve/main/script.js
- Command line
-
hf download hf://spaces/dadif22/database-whisperer/script.js
-
curl -L -o script.js https://huggingface.co/spaces/dadif22/database-whisperer/resolve/main/script.js
801 Bytes
| // Scripts globaux | |
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialiser les tooltips pour les icônes | |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | |
| tooltipTriggerList.map(function (tooltipTriggerEl) { | |
| return new bootstrap.Tooltip(tooltipTriggerEl); | |
| }); | |
| // Gestion des onglets | |
| const tabs = document.querySelectorAll('[data-tab-target]'); | |
| tabs.forEach(tab => { | |
| tab.addEventListener('click', () => { | |
| const target = document.querySelector(tab.dataset.tabTarget); | |
| document.querySelectorAll('[data-tab-content]').forEach(content => { | |
| content.classList.add('hidden'); | |
| }); | |
| target.classList.remove('hidden'); | |
| }); | |
| }); | |
| }); |