From: Chris Duncan Date: Thu, 9 Jul 2026 17:15:16 +0000 (-0700) Subject: Fix scoring status output. X-Git-Tag: v5.2.0~8^2~2 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=97920e9e01bf8478686cd25248b71683093766eb;p=nano-pow.git Fix scoring status output. --- diff --git a/test/index.html b/test/index.html index d766f5f..7e3269c 100644 --- a/test/index.html +++ b/test/index.html @@ -226,7 +226,9 @@ SPDX-License-Identifier: GPL-3.0-or-later const times = [] let hash, result, start, end, check, isValid for (let i = 0; i < size; i++) { - status.textContent = status.textContent.replace(`${(i || 1) - 1}/${size}`, `${i}/${size}`) + const prev = RegExp(`${(i || 1) - 1}/${size}$`) + const next = `${i}/${size}` + status.textContent = status.textContent.replace(prev, next) hash = random() start = performance.now() result = await NanoPow.work_generate(hash, { difficulty, effort, api })