April Fools Challenge Submission ☕️🤡
This is a submission for the DEV April Fools Challenge
What I Built
I built a funny Love Percentage Calculator website ❤️😂
Users enter two names and it generates a random love percentage.
Sometimes it gives 3%, sometimes 99% 😆
It is completely useless but super fun for friends and prank sharing.
username
kenil_kasetiya_1269332d1a
*code *:-----
`<!DOCTYPE html>
body{ margin:0; padding:0; font-family:Arial, sans-serif; background:linear-gradient(135deg,#ff4e50,#fc913a); height:100vh; display:flex; justify-content:center; align-items:center; } .container{ background:white; padding:30px; border-radius:20px; box-shadow:0 0 20px rgba(0,0,0,0.2); text-align:center; width:320px; } h1{ color:#ff4e50; } input{ width:90%; padding:10px; margin:10px 0; border:2px solid #ff4e50; border-radius:10px; font-size:16px; } button{ background:#ff4e50; color:white; border:none; padding:12px 20px; border-radius:10px; cursor:pointer; font-size:16px; } button:hover{ background:#e63e40; } #result{ margin-top:20px; font-size:22px; color:#333; font-weight:bold; }
<h1>❤️ Love Calculator ❤️</h1>
Check Love %
function calculateLove(){
let name1 = document.getElementById("name1").value;
let name2 = document.getElementById("name2").value;
if(name1=="" || name2==""){
document.getElementById("result").innerHTML="Enter both names 😒";
return;
}
let love = Math.floor(Math.random()*101);
let msg = "";
if(love > 80){
msg = "😍 Perfect Couple!";
}else if(love > 50){
msg = "😊 Good Match!";
}else{
msg = "😂 Better Luck Next Time!";
}
document.getElementById("result").innerHTML =
name1 + " ❤️ " + name2 + "<br>" + love + "%<br>" + msg;
}
`
For further actions, you may consider blocking this person and/or reporting abuse
