From 955ac3d382f1718ff0acb1304e2095ac7cbd13e5 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 6 Sep 2023 00:21:08 +0200 Subject: [PATCH] (:) registration
--- templates/register.html | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/templates/register.html b/templates/register.html index 70d2f995..8ec911fd 100644 --- a/templates/register.html +++ b/templates/register.html @@ -91,7 +91,8 @@ header { - PASS :

+
+(:) registration
@@ -134,22 +135,26 @@ document.addEventListener('DOMContentLoaded', function() { const uplanetElement = document.querySelector('input[name="uplanet"]'); const passElement = document.querySelector('input[name="g1pub"]'); - // Generate a random 6-digit number and set it as the default value for "PASS" - //~ if (passElement) { - //~ const randomPass = Math.floor(100000 + Math.random() * 900000); // Generates a random 6-digit number - //~ passElement.value = randomPass.toString(); - //~ } + //~ // Generate a random 6-digit number and set it as the default value for "PASS" + if (passElement) { + const randomPass = Math.floor(100000 + Math.random() * 900000); // Generates a random 6-digit number + passElement.value = randomPass.toString(); + } if (latElement && lonElement) { latElement.value = salt || '0.00'; // Default to '0.00' if lat is missing lonElement.value = pepper || '0.00'; // Default to '0.00' if lon is missing uplanetElement.value = '@'; // Default to '0.00' if lon is missing } + const satURL = `https://ipfs.copylaradio.com/ipfs/QmfVZajimvgkCHhybnwVuKuY1aDzGLBsDbnzSXpN7RmfUm/sat_render.html?southWestLat=${latElement.value}&southWestLon=${lonElement.value}°=0.1`; document.getElementById("satLink").href = satURL; const mapURL = `https://ipfs.copylaradio.com/ipfs/QmRG3ZAiXWvKBccPFbv4eUTZFPMsfXG25PiZQD6N8M8MMM/map_render.html?southWestLat=${latElement.value}&southWestLon=${lonElement.value}°=0.1`; document.getElementById("mapLink").href = mapURL; + document.getElementById("LAT").innerHTML = latElement.value ; + document.getElementById("LON").innerHTML = lonElement.value ; + });