Result scaling based on length & removed console.clear()

This commit is contained in:
Антон Аксенов 2022-02-09 15:40:15 +08:00
parent 50ea227d91
commit 4d39d06150
No known key found for this signature in database
GPG Key ID: 2B5A252645C3E670

View File

@ -2,8 +2,6 @@
// I tried my best to make the code as simple as possible please dont mind the variable names. // I tried my best to make the code as simple as possible please dont mind the variable names.
// Also this idea came in my mind after checking Traversy Media's latest video. // Also this idea came in my mind after checking Traversy Media's latest video.
// Clear the concole on every refresh
console.clear();
// set the body to full height // set the body to full height
// document.body.style.height = `${innerHeight}px` // document.body.style.height = `${innerHeight}px`
@ -132,6 +130,7 @@ generateBtn.addEventListener("click", () => {
const hasSymbol = symbolEl.checked; const hasSymbol = symbolEl.checked;
generatedPassword = true; generatedPassword = true;
resultEl.innerText = generatePassword(length, hasLower, hasUpper, hasNumber, hasSymbol); resultEl.innerText = generatePassword(length, hasLower, hasUpper, hasNumber, hasSymbol);
resultEl.style.fontSize = (30 - (length / 2)) + "px";
copyInfo.style.transform = "translateY(0%)"; copyInfo.style.transform = "translateY(0%)";
copyInfo.style.opacity = "0.75"; copyInfo.style.opacity = "0.75";
copiedInfo.style.transform = "translateY(200%)"; copiedInfo.style.transform = "translateY(200%)";