classroom-cheats

Quizlet

Live

javascript:try{async function getSetId(pin){const res=await fetch(`https://quizlet.com/webapi/3.8/multiplayer/game-instance?gameCode=${pin}`);const json=await res.json();if(json.error)throw new Error(json.error.message);return json.gameInstance.itemId;}async function getSetData(setId){const res=await fetch(`https://quizlet.com/${setId}`);const text=await res.text();const data=text.match(/\\"termIdToTermsMap\\":{.+?{.+?\\"termSort\\":/gi)?.[0];if(!data)throw new Error("Failed to parse set data.");const parsed=JSON.parse(data.slice(21,-14).replaceAll(`\\"`,`"`));return[Object.fromEntries(Object.values(parsed).map(({word, definition})=>[word, definition])),Object.fromEntries(Object.values(parsed).map(({word, definition})=>[definition, word]))];}function getActiveQuestion(){try{const question=document.querySelector(".StudentPrompt-text").textContent;const answers=Array.from(document.querySelectorAll(".StudentAnswerOption-text"));return[question, answers];}catch{}return[null,null];}(async()=>{const pin=prompt("Enter PIN, like: XXX-XXX","").match(/[0-9a-zA-Z]/g).join("");if(pin.length!==6)throw new Error("Pin must be 6 characters in length.");const setId=await getSetId(pin);const[term2Def, def2Term]=await getSetData(setId);setInterval(async function(){const[question,choices]=getActiveQuestion();if(!question||!choices)return;if(question in term2Def){choices.forEach((choice)=>{if(choice.textContent===term2Def[question])choice.style.fontWeight="bolder";});}else if(question in def2Term){choices.forEach((choice)=>{if(choice.textContent===def2Term[question])choice.style.fontWeight="bolder";});}else{choices.forEach((choice)=>{choice.style.fontWeight="normal";});}},0);})()}catch(err){alert(err)};void 0

(Micro)match

javascript:(function(){const matches={};Quizlet.matchModeData.terms.forEach((term)=>{matches[term.word]=term.definition});let css='FormattedText notranslate TermText MatchModeQuestionGridTile-text';if(document.getElementsByClassName(css).length===0){css='MatchModeQuestionScatterTile'}const tiles=Array.from(document.getElementsByClassName(css));const colors=['#f93640','#f98836','#f9e936','#3df936','#36f9d9','#3650f9','#7e36f9','#dc36f9','#ffffff','#a3a3a3','#424242'];Array.from(document.getElementsByClassName('MatchModeQuestionGridTile-image')).forEach((image)=>{image.style.display='none'});let colorIndex=0;for(const term in matches){const definition=matches[term];tiles.forEach((tile)=>{if(tile.textContent===term){tiles.forEach((box)=>{if(box.textContent===definition){box.style.background=colors[colorIndex];box.style.color='black'}});tile.style.background=colors[colorIndex];tile.style.color='black';colorIndex+=1}})}})();void 0

Gravity

javascript:(function(){if(!window.gooseGravity){window.gooseGravity=true;const matches={};Quizlet.gravityModeData.terms.forEach((term)=>{matches[term.word]=term.definition});const reversed={};for(const term in matches){reversed[matches[term]]=term}setInterval(function(){const asteroids=Array.from(document.querySelectorAll('.TermText'));if(asteroids.length===0){return}asteroids.forEach((asteroid)=>{const term=asteroid.textContent;if(asteroid.gooseAnswered){return}if(term in matches){asteroid.textContent=matches[term];asteroid.gooseAnswered=true}else if(term in reversed){asteroid.textContent=reversed[term];asteroid.gooseAnswered=true}})},100)}})();void 0