Wordle Solver

Gives You the Wordle Answer

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Wordle Solver
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Gives You the Wordle Answer
// @author       Nick
// @match        https://www.nytimes.com/games/wordle/*
// @icon         https://www.nytimes.com/games-assets/v2/assets/wordle/page-icons/wordle-icon.svg
// @grant        none
// @license      MIT
// ==/UserScript==

let date = new Date()
let day = (date.getMonth()+1)
if(day.toString().length < 2) {
    day = "0"+day
}
let date_wordle = date.getYear()+1900+"-"+day+"-"+date.getDate()
fetch("https://www.nytimes.com/svc/wordle/v2/"+date_wordle+".json").then((data)=>{
    data.json().then((json)=>{
        alert("The Wordle Answer is: '"+json.solution+"'")
    })
})