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.
目前為
// ==UserScript==
// @name Wordle - Word Reveal Hack
// @namespace q1k
// @version 1.6
// @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;} /*#game{max-width:100%;} #game>*{min-width:var(--game-max-width);margin:0 auto;}*/ #word-reveal{width:100vw;margin-left:-100%;/*margin:0;*/ background:#555;color:#555;text-align:center;line-height:1.5em;user-select:none;} #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";