count tps

This commit is contained in:
rahmagustin 2026-04-07 21:59:50 +07:00
parent 252fd5a124
commit 652b6c9f76
1 changed files with 19 additions and 0 deletions

View File

@ -489,5 +489,24 @@ className: 'user-location'
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
document.querySelectorAll(".counter").forEach(el => {
const target = +el.dataset.target;
let val = 0;
const step = () => {
val += Math.ceil(target / 90);
if (val < target) {
el.textContent = val;
requestAnimationFrame(step);
} else {
el.textContent = target;
}
};
step();
});
});
</script>
</section>
@endsection