Al hacer clic en “Aceptar todas las cookies”, aceptas el almacenamiento de cookies en tu dispositivo para mejorar la navegación del sitio, analizar el uso del sitio y ayudar en nuestros esfuerzos de marketing. Más información
Configuración de cookies
Al hacer clic en “Aceptar todas las cookies”, aceptas el almacenamiento de cookies en tu dispositivo para mejorar la navegación del sitio, analizar el uso del sitio y ayudar en nuestros esfuerzos de marketing. Más información
Más información sobre los eventos y seminarios web Ultralytics
Obtén más información sobre los próximos eventos y seminarios web, donde profundizaremos en las últimas ideas y avances en el campo de la visión artificial.
tag)
document.addEventListener("DOMContentLoaded", () => {
// Get the element with the ID 'githubStars'
const starsElement = document.getElementById("githubStarsButton");
if (starsElement) {
// Get the current text content
const rawNumber = starsElement.textContent.trim();
// Remove any existing formatting (commas, spaces, etc.)
const cleanNumber = rawNumber.replace(/[,\s]/g, "");
// Convert to number and format with thousand separators
const number = parseFloat(cleanNumber);
if (!Number.isNaN(number)) {
// Format the number with commas (e.g., 1000 -> 1,000)
const formattedNumber = number.toLocaleString("en-US");
// Update the element with the formatted number
starsElement.textContent = formattedNumber;
}
}
// Handle responsive visibility for githubString
const githubString = document.getElementById("githubString");
if (githubString) {
function handleResize() {
if (window.innerWidth < 1200) {
githubString.style.display = "none";
} else {
githubString.style.display = "";
}
}
// Run on load
handleResize();
// Run on window resize
window.addEventListener("resize", handleResize);
}
});