This is currently a work in progress.
A keysmash generator with a click-to-copy function using vanilla JavaScript. This generates a random string of 8 to 25 letters from 'a' to 'l' on the keyboard.
- Get the generator working
- Click-to-copy function
- Fix footer
- Add links: portfolio, github
- Upload to website
- Add live demo link to README.md
- Responsiveness
- Metadata
- Sketch a rough layout for the generator
- Code HTML base and SCSS
- Create a button with an onclick event
- Onclick event which encompasses:
- Checks if the output field is empty, if it isn’t then clear it
- Then run the generator function
- Variable for output
- Array consisting of all letters from ‘a’ to ‘l’
- A random number generator to pick the number of letters to generate
- Pass that random number into a variable
- For loop to generate random letters from the array using the random number
- Another random number generator to randomly pick the letters from the array
- Display the result from the for loop onto the document output field
- Read Clipboard API documentation
- If statement to check if there’s text in the output field
- If yes, display the tooltip for ‘click to copy’ when hovering over the output field
- Copy to clip board function
- Onclick event that changes the tooltip display to ‘text copied!’