Skip to content

Instantly share code, notes, and snippets.

Last active February 4, 2022 23:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jwhamilton99/b9b50355490e41c147855a254c4442e5 to your computer and use it in GitHub Desktop.
Wordle Solver Bookmarklet Code
// Define an anonymous function
javascript:(function() {
// Check if you're actually on the Wordle page
if( == "" && window.location.pathname == "/wordle/") {
// Get the page's game object (#1)
let game = document.body.getElementsByTagName("game-app")[0];
// Check if the game is finished
if(game.gameStatus != "IN_PROGRESS") {
window.alert("Game is already finished.");
// Input the game's solution into the board (#2 and #3)
// Tell the game you actually inputted 5 letters (#4)
game.tileIndex = 5;
// Submit the inputted guess (#5)
} else {
window.alert("You are currently not on the Wordle website.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment