mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
fix: fix js to limit user input
Reps: OPS-54
This commit is contained in:
parent
36c3d0a83f
commit
c705e863d1
1 changed files with 2 additions and 2 deletions
|
|
@ -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...";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue