This script adds an element to the bottom of the page with the daily word. Simply hover it and the daily word is revealed. Click to show and alert. Always "guess" the word in the first try and impress your friends.
当前为
// ==UserScript==
// @name Wordle - Word Reveal Hack
// @namespace q1k
// @version 1.5
// @description This script adds an element to the bottom of the page with the daily word. Simply hover it and the daily word is revealed. Click to show and alert. 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;} #word-reveal{user-select:none;text-align:center;line-height:1.5em;background:#555;color:#555;} #word-reveal:hover{color:white;} .game-id{display:none;}";
var game = document.querySelector("game-app").shadowRoot.querySelector("#game");
game.appendChild(styles);
game.appendChild(mydiv);
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";