Wordle - Word Reveal Hack

This script adds an element to the bottom of the page with the daily word. Simply hover & click and the daily word is revealed. Always "guess" the word in the first try and impress your friends.

目前为 2022-08-17 提交的版本。查看 最新版本

// ==UserScript==
// @name         Wordle - Word Reveal Hack
// @namespace    q1k
// @version      1.6.3
// @description  This script adds an element to the bottom of the page with the daily word. Simply hover & click and the daily word is revealed. Always "guess" the word in the first try and impress your friends.
// @author       q1k
// @match        *://www.nytimes.com/games/wordle/*
// @run-at       document-idle
// ==/UserScript==

var mydiv = document.createElement("div");
mydiv.setAttribute("id","word-reveal");
var styles = document.createElement("style");
styles.innerHTML="*{box-sizing:border-box;} body{margin:0;display:flex;flex-direction:column;} #word-reveal{order:3;width:100%;margin-left:-100%;margin:0; background:#555;color:#555;text-align:center;line-height:1.5em;user-select:none;} #word-reveal:hover{color:white;}";

//var gam = document.querySelector("#wordle-app-game");
document.body.appendChild(mydiv);
document.body.appendChild(styles);

mydiv.addEventListener('click',function(e){
    mydiv.textContent = "Today's word: " + JSON.parse(localStorage['nyt-wordle-state']).solution.toUpperCase();
});
mydiv.innerHTML = "Click to reveal today's word";