From: Ardis Lu Date: Sun, 31 May 2026 06:29:44 +0000 (-0700) Subject: Populate block number input if no value is provided X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=9233480f64a7880c0156efbd5e5a3d531d9c8e24;p=block-hash-calculator Populate block number input if no value is provided --- diff --git a/index.html b/index.html index 6096508..24a04a2 100644 --- a/index.html +++ b/index.html @@ -92,6 +92,9 @@ document.querySelector('#out-header').textContent = JSON.stringify(header, (_, v) => typeof v === 'bigint' ? v.toString() : v, 2).replaceAll('"', ''); document.querySelector('#out-encoded').textContent = encoded; document.querySelector('#out-hash').textContent = hash; + if (num === '') { + e.target.elements.num.value = Number(block.number); + } } document.querySelector('output').style.setProperty('display', 'unset');