Example:
How it works?
- Gets the game data from
localStorage
- Iterates over the game boxes and generates the text like below:
Wordle 643 4/6
:white_circle::white_circle::white_circle::white_circle::large_green_circle:
:white_circle::large_green_circle::white_circle::white_circle::white_circle:
:white_circle::large_yellow_circle::large_yellow_circle::white_circle::white_circle:
:large_green_circle::large_green_circle::large_green_circle::large_green_circle::large_green_circle:
- Copies the text (shown above) to the clipboard using
navigator.clipBoard
API
Tested on:
- Chrome
- Slack (should also work on clients that render
:white_circle:
,:large_yellow_circle:
and:large_green_circle:
correctly) - Unauthenticated flow (should work for Authenticated users too but haven't tested it yet)
- Add a Bookmark to your browser
- Choose any name you like (I chose
Worbbles
) - Put the code from bookmarklet.min.js in the
URL
field (see screenshot below)
Now you can click on the created bookmark(let) to execute the script and copy the current board to clipboard.
Click Away and have fun!! 🖱️
- Feedback on copy complete
- Hide stats modal if open
- Check if the game is not finished