dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit c5bd38cefd3d06e95bed4c157a162790a2c8ffcc
parent 0d431a17ffd53f436d4a31e8ec8d5833b65c447b
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu,  1 Jun 2023 04:52:55 -0700

cleanup

Diffstat:
Mpkg/odometer/odometer.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkg/odometer/odometer.go b/pkg/odometer/odometer.go @@ -36,15 +36,15 @@ func (o *Odometer) Css() string { out += fmt.Sprintf(` .odometer .odometer%d:before { visibility: hidden; content: "%c"; animation-name: odometer%d_frames; animation-duration: 3s; } @keyframes odometer%d_frames {`, i, o.s[i], i, i) + out += ` 0% { visibility: visible; }` n := 20 step := 100.0 / float64(n) pct := 0.0 - out += ` 0% { visibility: visible; }` - for i := 0; i <= n; i++ { - if pct >= 99 { + for j := 0; j <= n; j++ { + if pct >= 95 { break } - if i == 0 { + if j == 0 { pct += utils.RandFloat(0, 3) } num := utils.RandInt(0, 9)