Create a bookmark with following link in you browser's bookmarks bar to have one click password (or alpha-numeric string) generator:
javascript:(() => {
prompt('Please copy the following generated String', (
function generateRandomString(length) {
const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
let result = '';
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * chars.length);
result += chars.charAt(randomIndex);
}
return result;
})(window.prompt('Enter the desired length of string:', 16))); return false;})()
Need help?
Here are the steps to Create a Bookmarklet in Chrome (Other browsers have similar process):
Make Sure "Bookmarks Bar" Folder is selected in the List and Click "Save"
Click your newly created bookmark from the Bookmarks Bar to test it out.
Don't keep it just to yourself, share it with others too.