Zybooks? | JavaScript

ThiccDaddyLOAF

October 29th, 2020 04:27:07 AM

					
questions = Array.from(document.querySelectorAll(".multiple-choice-question")); async function hackRadio(question){ if(question.querySelector(".question-chevron").getAttribute("aria-label") == "Question completed") return; let answerChoices = question.querySelectorAll(".zb-radio-button"); async function guess(answerChoice){ answerChoice.querySelector("label").click(); } let pause = 0; for(let answerChoice of answerChoices){ setTimeout(()=>{guess(answerChoice)},pause); //No need to check given that it will record the correct answer anyways. pause += 1000; } } for(let question of questions){ hackRadio(question); } questions = Array.from(document.querySelectorAll(".short-answer-question")); async function hackShortAnswer(question){ if(question.querySelector(".question-chevron").getAttribute("aria-label") == "Question completed") return; question.querySelector("textarea").value = question.querySelector(".forfeit-answer").textContent; //question.querySelector(".check-button").click(); They are smart bastards } for(let question of questions){ const showAnswerButton = question.querySelector(".show-answer-button"); showAnswerButton.click(); showAnswerButton.click(); hackShortAnswer(question); }

Featured Posts