fix: fix js to limit user input

Reps: OPS-54
This commit is contained in:
0xjrx 2025-03-21 15:56:08 +01:00
parent 36c3d0a83f
commit c705e863d1
No known key found for this signature in database
GPG key ID: 61C53033867D0271

View file

@ -40,8 +40,8 @@ document.getElementById("submit-btn").addEventListener("click", function() {
if (userInput.trim() === "") { if (userInput.trim() === "") {
responseText.textContent = "Please enter a prompt!"; responseText.textContent = "Please enter a prompt!";
} }
else if (userInput.length !== 5) { else if (userInput.length > 100) {
responseText.textContent = "Input must be exactly 5 characters long!"; responseText.textContent = "Input must under 100 characters long!";
} }
else if (userInput.trim() === "amogus") { else if (userInput.trim() === "amogus") {
responseText.textContent = "🤖 AI is thinking..."; responseText.textContent = "🤖 AI is thinking...";