0ME9A / password

Password is a free online tool that helps you create strong and random passwords for your accounts. You can customize your password options and copy the generated password to your clipboard with one click.
https://password.ome9a.com
MIT License
5 stars 4 forks source link

Store history in local storage #27

Closed DavidKozdra closed 10 months ago

DavidKozdra commented 10 months ago

The history of passwords can be saved locally with the local storage

this way users will have passwords for a longer period of time On make a password or add to history // Retrieve the existing passwords array from localStorage const existingPasswords = localStorage.getItem("passwords") ? JSON.parse(localStorage.getItem("passwords")) : [];

// Create a new password and push it to the existing array const newPassword = "yourNewPassword"; // Replace with your actual password or password object existingPasswords.push(newPassword);

// Save the updated array back to localStorage localStorage.setItem("passwords", JSON.stringify(existingPasswords));

DavidKozdra commented 10 months ago

included in the new PR