From 41c3b59755676f0ae94a18731af4b7291b3cd30c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 19 Mar 2025 10:12:51 -0700 Subject: [PATCH] refactor: change testimonial rotation to random selection --- aider/website/home.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/aider/website/home.html b/aider/website/home.html index fd43ba60f..ada76720d 100644 --- a/aider/website/home.html +++ b/aider/website/home.html @@ -700,14 +700,11 @@ aider --model gpt-4o --api-key openai=your-key-goes-here document.addEventListener('DOMContentLoaded', function() { initializeTestimonials(); - let currentIndex = 0; - - // Rotate one testimonial at a time + // Rotate one testimonial at a time, randomly selecting which one to change setInterval(function() { - updateSingleTestimonial(currentIndex); - - // Move to the next index - currentIndex = (currentIndex + 1) % displayCount; + // Randomly select which testimonial to update + const randomIndex = Math.floor(Math.random() * displayCount); + updateSingleTestimonial(randomIndex); }, 3000); });