Quizlet Learn

Highlight the correct answer

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Quizlet Learn
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Highlight the correct answer
// @author       pigPen6969
// @match        *quizlet.com/*/learn
// @icon         https://www.google.com/s2/favicons?domain=quizlet.com
// @grant        none
// ==/UserScript==


(function() {
    'use strict';
    var trms = []
    let i=0
    for (let o of Quizlet.assistantModeData.studiableData.studiableMediaConnections){
        if (i%2 == 0){
            trms.push([o.text.plainText])
        }else{
            trms[trms.length-1].push(o.text.plainText)
        }
        i++
    }
    setInterval(function(){
        try{
            let d = document.querySelector("div.FormattedText.notranslate")
            if (d != null){
                let t = d.getAttribute("aria-label");
                let ret = "";
                for (let tmr of trms){
                if (tmr[0]==t){
                 ret = tmr[1];}
                if (tmr[1] == t){
                ret = tmr[0];}
                for (let tmr of document.querySelectorAll(".wbkjose")){
                    if (tmr.children[1].textContent == ret){
                    tmr.style.backgroundColor = "blue"
                    }
                }
                }

            }
        }catch(e){}
    }, 100);
})();