mywordle cheat

get the answer for a mywordle

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         mywordle cheat
// @description  get the answer for a mywordle
// @icon         https://i.imgur.com/ORAaPzD.png
// @version      1

// @author       VillainsRule
// @namespace    https://github.com/VillainsRule/Greasyfork

// @match        *://mywordle.strivemath.com/?word=*
// @grant        none
// ==/UserScript==

document.body.insertAdjacentHTML('beforeend', `
    <style>
        .mwc {
            position: absolute;
            top: 10px;
            left: 15px;
            font-size: 16px;
        }

        .mwc-get {
            cursor: pointer;
            text-decoration: underline;

        }
    </style>

    <span class="mwc mwc-get">get answer</span>
`);

document.querySelector('.mwc-get').onclick = () => {
    let root = document.querySelector('#root > div');
    let reactName = Object.keys(root).find(key => key.startsWith('__reactFiber$'));
    let reactData = root[reactName];
    let word = reactData.return.updateQueue.lastEffect.next.next.deps[0].word;

    if (!word) alert('it\'s likely the cheat was "patched", open an issue on github\nhttps://github.com/VillainsRule/Greasyfork/issues');

    let text = document.querySelector('.mwc');

    text.innerHTML = `answer: <u>${word}</u>`;
    text.classList.remove('mwc-get');
}