Quizlet gravity game cheat

The correct answer pops up in the browser console and the restart button down left

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

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 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.

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

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!)

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.

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

// ==UserScript==
// @name         Quizlet gravity game cheat
// @namespace    Danielv123
// @version      2.4
// @description  The correct answer pops up in the browser console and the restart button down left
// @author       You
// @match        https://quizlet.com/*/gravity
// @grant        none
// ==/UserScript==

// Set settings and stuff
if(!localStorage.cheat){
    localStorage.cheatAutoType = false;
    localStorage.cheatActivated =  true;
}

// selectors, if something breaks these probably needs updating
// get word from asteroid
// broken 19.09.17 selector = "#GravityGameTarget > div > div > div > div.ModeLayout-content > div > div.GravityGameplayView-inner > div:nth-child(5) > div > div > div > .TermText > .TermText";
selector = "div > div > div > .TermText > .TermText";

// outputSelector = "#GravityGameTarget > div > div > div > div.ModeLayout-controls > div > div > div > div.ModeControls-main > div.ModeControls-actions > div:nth-child(2) > div > button > span";
outputSelector = "#GravityModeTarget > div > div > div > div.ModeLayout-controls > div > div > div > div.ModeControls-main > div.ModeControls-actions > div:nth-child(2) > div > button > span";

inputSelector = "#GravityGameTarget > div > div > div > div.ModeLayout-content > div > div.GravityGameplayView-inner > div.GravityGameplayView-typingPrompt > span > div > div > div.GravityTypingPrompt-inputWrapper > textarea";

inputRepeatSelector = "#GravityGameTarget > div > div > div > div.ModeLayout-content > div > div.GravityGameplayView-inner > div:nth-child(3) > div > div > div > div.GravityCopyTermView-inputWrapper > textarea";

setInterval(function() {
    // console.log(words);
    if(document.querySelector(selector) && localStorage.cheatActivated == "true"){
        translatedWord = words[document.querySelector(selector).innerHTML.replace(RegExp(
            '<!--[\\s\\S]*?(?:-->)?'
            + '<!---+>?'  // A comment with no body
            + '|<!(?![dD][oO][cC][tT][yY][pP][eE]|\\[CDATA\\[)[^>]*>?'
            + '|<[?][^>]*>?',  // A pseudo-comment
            'g'), "")];
        console.log(translatedWord);
        // update the feedback button with one of our translated words
        document.querySelector(outputSelector).innerHTML = translatedWord;
        if(document.querySelector(inputSelector).value == "" && localStorage.cheatAutoType == "true"){
            document.querySelector(inputSelector).value = translatedWord;
        }
    }
}, 100);

// Quizlet.gravityModeData.terms[0].definition gets data straight from quizlet :3
words = {};
for(i = 0; i<Quizlet.gravityModeData.terms.length; i++){
    words[Quizlet.gravityModeData.terms[i].word] = Quizlet.gravityModeData.terms[i].definition;
}