Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions entries/password-rater.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>Password Rater</title><meta name="description" content="Rates your passwords"><meta name="author" content="Lakshya Singh Chauhan"><meta name="github" content="lakshyaelite"><style>body { background-color: hsl(0, 0%, 90%); font-family: Arial, sans-serif;}#main { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 12px; background-color: hsl(0, 0%, 100%); padding: 16px 18px; border-radius: 12px; box-shadow: 0px 20px 20px hsla(0, 0%, 0%, 0.07); width: 280px;}h3 { margin: 0; text-align: center;}input { padding: 8px; font-size: 15px;}meter { width: 100%; height: 16px;}meter::-webkit-meter-bar { background: #e6e6e6; border-radius: 8px;}meter::-webkit-meter-optimum-value { border-radius: 8px;}meter::-moz-meter-bar { background: #e6e6e6; border-radius: 8px;}#strengthText { font-weight: bold; text-align: center; margin: 4px 0;}ul { list-style: none; padding: 0; margin: 6px 0 0; font-size: 14px;}li { display: flex; align-items: center; gap: 6px; opacity: 0.6; transition: opacity 0.2s ease;}li.valid { opacity: 1;}.check { font-weight: bold; width: 14px; text-align: center;}#credit { position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: 0.5;}#credit a { color: inherit; text-decoration: none; font-weight: bold;}#credit a:hover { text-decoration: underline;}</style></head><body><div id="main"><h3>Enter password</h3><input type="password" id="password" autocomplete="off"><meter id="strengthMeter" min="0" max="7" low="3" high="5" optimum="7" value="0"></meter><p id="strengthText">Start typing a password</p><ul><li id="len"><span class="check">✖</span>At least 8 characters</li><li id="upper"><span class="check">✖</span>Uppercase letter</li><li id="lower"><span class="check">✖</span>Lowercase letter</li><li id="number"><span class="check">✖</span>Number</li><li id="symbol"><span class="check">✖</span>Special character</li></ul></div><p id="credit"> Made by <a href="https://lakshyasinghchauhan.com/?ref=password-rater" target="_blank">Lakshya</a></p><script>const password=document.getElementById("password"),meter=document.getElementById("strengthMeter"),text=document.getElementById("strengthText"),checks={len:a=>8<=a.length,upper:a=>/[A-Z]/.test(a),lower:a=>/[a-z]/.test(a),number:a=>/\d/.test(a),symbol:a=>/[^A-Za-z0-9]/.test(a)};password.addEventListener("input",()=>{const a=password.value;let b=0;for(const b in checks){const c=checks[b](a),d=document.getElementById(b);d.classList.toggle("valid",c),d.querySelector(".check").textContent=c?"\u2714":"\u2716"}checks.len(a)&&(b+=2),checks.upper(a)&&b++,checks.lower(a)&&b++,checks.number(a)&&b++,checks.symbol(a)&&(b+=2),meter.value=b,text.textContent=a?2>=b?"\uD83D\uDE2C Very Weak":4>=b?"\uD83D\uDE10 Weak":6>=b?"\uD83D\uDE42 Strong":"\uD83D\uDD25 Very Strong":"Start typing a password"});</script></body></html>