From e239ee39c2e92686e855489156bb1623d310c8a7 Mon Sep 17 00:00:00 2001 From: Geoff Allan <75588501+crotonrz@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:12:30 -0700 Subject: [PATCH] Update index.html --- index.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index e1eb3e2..972bdbe 100644 --- a/index.html +++ b/index.html @@ -92,16 +92,10 @@

Generated Text

function generateText() { const characterName = document.getElementById("characterName").value; const email = document.getElementById("email").value; - const comment = document.getElementById("comment").value; + const comment = document.getElementById("comment").value || "No comments"; // Provide default text if comments are empty - // Check if email is valid - if (!email.includes("@") || !email.includes(".")) { - alert("Please enter a valid email address."); - return; - } - - // Generate output text - const output = `Character Name: ${characterName}\nEmail: ${email}\nComments: ${comment}`; + // Format the output text + const output = `EZ Server :: Character: ${characterName} E-Mail: ${email} Comments: ${comment}`; document.getElementById("output").textContent = output; }