]> git.codecow.com Git - nano25519.git/commitdiff
Enable testing only after successfully loading library and test vectors. main
authorChris Duncan <chris@zoso.dev>
Mon, 23 Mar 2026 06:07:50 +0000 (23:07 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 23 Mar 2026 06:07:50 +0000 (23:07 -0700)
index.html

index 39cd467efd951b451d4af97cbf9663ff78b9a0a8..bbbc26872158c6cba33ee4b463e32185591da0db 100644 (file)
@@ -39,9 +39,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
                                ({ NANO_ORG_VECTOR, PYTHON_ED25519_BLAKE2B_VECTORS } = await import('https://git.codecow.com/?p=nano25519.git;a=blob_plain;f=vectors.mjs;hb=refs/heads/main'))
                        } catch (err) {
                                console.error(err)
+                               document.getElementById('status').innerHTML = err?.message ?? err ?? `ERROR WHILE LOADING`
                        }
                }
 
+               if (nano25519 && PYTHON_ED25519_BLAKE2B_VECTORS) {
+                       document.getElementById('btnStartTest').disabled = false
+                       document.getElementById('status').innerHTML = `READY`
+               }
+
+
                /**
                * Computes various types of averages for a set of numbers.
                *
@@ -476,9 +483,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
                <label for="isDebug">Debug?</label>
                <input id="isDebug" type="checkbox" />
        </span>
-       <button id="btnStartTest">Go</button>
+       <button id="btnStartTest" disabled>Go</button>
        <hr />
-       <h3 id="status">WAITING</h3>
+       <h3 id="status">LOADING</h3>
        <hr />
        <pre id="summary"></pre>
        <hr />