(function() { const countEl = document.getElementById('lv-count-template--26911096275274__main'); if (!countEl) return; const root = countEl.closest('.live-views'); const min = parseInt(root?.dataset.min) || 120; // borne inférieure const max = parseInt(root?.dataset.max) || 280; // borne supérieure let n = Math.floor(Math.random() * (max - min + 1)) + min; countEl.textContent = n; function tick() { // petite variation -3 à +4, bornée const delta = Math.floor(Math.random() * 8) - 3; n = Math.max(min, Math.min(max, n + delta)); countEl.textContent = n; } // boucle avec intervalle légèrement aléatoire (8–13 s) (function loop(){ tick(); const delay = 8000 + Math.random() * 5000; setTimeout(loop, delay); })(); })(); Skip to main content
Tag

Standard