diff --git a/aider/website/home.html b/aider/website/home.html index c80b65b9b..a0c1b0730 100644 --- a/aider/website/home.html +++ b/aider/website/home.html @@ -706,11 +706,22 @@ aider --model gpt-4o --api-key openai=your-key-goes-here document.addEventListener('DOMContentLoaded', function() { initializeTestimonials(); + // Track the last flipped card index to avoid repeats + let lastFlippedIndex = -1; + // Rotate one testimonial at a time, randomly selecting which one to change setInterval(function() { - // Randomly select which testimonial to update - const randomIndex = Math.floor(Math.random() * displayCount); + // Select a random index that's different from the last flipped one + let randomIndex; + do { + randomIndex = Math.floor(Math.random() * displayCount); + } while (randomIndex === lastFlippedIndex && displayCount > 1); + + // Update the selected testimonial updateSingleTestimonial(randomIndex); + + // Store this index as the last flipped + lastFlippedIndex = randomIndex; }, 3000); });