-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.min.js
2 lines (2 loc) · 49.8 KB
/
index.min.js
1
2
/*! DrewSnow v0.0.1 | (c) https://github.com/SnowLord7 */
let _extensionVersion=1601958708942;function Alert(e,t){let n=document.createElement("div");n.style="box-shadow: 0 0.3125rem 1rem 0 rgba(0, 0, 0, 0.24); transform: translateX(-50%); margin-bottom: 2.8125rem; margin-top: 2.8125rem; max-width: 100%; width: 37.5rem; position: relative; top: 0; left: 50%; z-index: 2147483647; color: rgb(69, 83, 88); display: block; background-clip: border-box; background-color: rgb(255, 255, 255)",n.className="custom-alert-container";let i=document.createElement("div");i.style="background-color: rgb(66, 87, 178); color: rgb(255, 255, 255); font-size: 30px; line-height: 26px; padding: 32px;",i.innerHTML=e+'<span onclick="this.parentElement.parentElement.remove();" class="UIButton-wrapper" style="position: absolute; right: 0; width: 94px; cursor: pointer;"><svg class="UIIcon UIIcon--x-thin"><noscript></noscript><use xlink:href="#x-thin"></use><noscript></noscript></svg></span>',n.appendChild(i);let o=document.createElement("div");return o.style="color: rgb(69, 83, 88); font-size: 16px; padding: 32px;",o.innerHTML=t,n.appendChild(o),document.body.appendChild(n),n}function removeClass(e){let t=document.getElementsByClassName(e);for(let e=0;e<t.length;e++)t[e].remove()}function obfuscate(e,t=77){let n="";for(let i=0;i<e.length;i++)n+="-"+(e.charCodeAt(i)+t%(i+1));return n.slice(1)}function getCookie(e){let t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;++e){let i=n[e];for(;" "==i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return""}function copyText(e){let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),document.body.appendChild(t),t.focus(),t.select(),/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?(t.style="z-index: 2147483646; position: fixed; left: 50%; top: 50%; width: 50%; height: 50%; transform: translate(-50%, -50%)",t.onclick=function(){this.focus(),this.select(),document.execCommand("copy")},t.onblur=function(){this.remove()}):(t.stype="opacity: 0; visibility: hidden;",document.execCommand("copy"),document.body.removeChild(t))}function Live(){this.paused=!1,this.container=drewsnow.html('\n\t\t<div style="line-height: 1.2; top: 0; left: 0; font-family: \'Courier New\', Courier, monospace; z-index: 2147483647; background-color: #202020; position: fixed; width: 350px; height: 475px; margin: 0; padding: 0; box-shadow: 0 5px 35px rgba(0, 0, 0, .75)">\n\t\t\t<nav style="cursor: move; user-select: none; text-align: right; color: #fff; position: absolute; width: 348px; height: 25px; margin: 1px;">\n\t\t\t\t<span onclick="alert(\'Intructions:\\n1.) Enter the Quizlet Live code into the input with a placeholder of 123456.\\n\\n2.) Click the large orange button that says Obtain Live Data.\\n\\n3.) Copy the text that is in the site that pops up (Ctrl + a, then Ctrl + c) and paste it (Ctrl + v) all in the textarea that says Paste The Site Data Here.\\n\\n4.) If the data if correct, the answer will be shown in the top right corner of your screen, and if you have the answer, it will be clicked for you.\\n\\nNotes:\\nPressing C will hide the answer.\\n\\nYou can toggle the script from automatically clicking the answer by clicking the text in the top right of your screen.\\n\\nPressing Ctrl + a will select all the text on a page.\\n\\nPressing Ctrl + v will paste the copied text for you.\\n\\nThis script was made by Drew Snow.\');" style="font-size: 15px; cursor: pointer; width: 100%; height: 100%;">?</span>\n\t\t\t\t<span onclick="this.parentElement.parentElement.remove();" aria-label="Close Interface Model" style="cursor: pointer; width: 100%; height: 100%; padding-right: 5px; font-size: 20px;">×</span>\n\t\t\t</nav>\n\t\t\t\n\t\t\t<div style="margin: 0; border-radius: 3px; background-color: #141414; position: absolute; bottom: 276px; width: 346px; height: 170px; margin: 2px;">\n\t\t\t\t<button id="getLiveDataButton">Obtain Live Data</button>\n\t\t\t\t<div id="liveCodeInput" style="height: 20px; width: 132px; position: relative; left: 0; margin-left: 50%; transform: translateX(-50%);"><input><input><input><input><input><input></div>\n\t\t\t\t<textarea spellcheck="false" id="quizletLiveDataInput" class="customScrollBar" placeholder="Paste The Site Data Here"></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin: 0; position: absolute; bottom: 0px; width: 346px; height: 275px; margin: 2px;">\n\t\t\t\t<div style="margin: 0;" id="customCommandOutput" class="customScrollBar">\n\t\t\t\t\t<div style="color: #339b00;">Loaded initial HTML.</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t'),this.css=drewsnow.css("\n @keyframes shake-animation {\n 0% { transform: translate(-51%, -1px) rotate(1deg); }\n 20% { transform: translate(-50%, 1px) rotate(0deg); }\n 40% { transform: translate(-49%, 2px) rotate(-1deg); }\n 60% { transform: translate(-51%, 0px) rotate(1deg); }\n 80% { transform: translate(-50%, -1px) rotate(-1deg); }\n 100% { transform: translate(-49%, 1px) rotate(0deg); }\n }\n \n .shakingElement {\n animation: shake-animation .4s; \n animation-iteration-count: infinite; \n }\n\n #getLiveDataButton {\n width: 346px;\n }\n\n #quizletLiveDataInput {\n background-color: rgba(0, 0, 0, .2);\n width: 340px; height: 103px;\n overflow-x: hidden;\n color: #d6d6d6;\n outline: none;\n resize: none;\n }\n\n #customCommandOutput {\n font-family: 'Courier New', Courier, monospace;\n background-color: rgba(0, 0, 0, .1);\n transition: all .3s ease;\n border-radius: 3px;\n overflow-y: scroll;\n font-size: 15px;\n\t\t\theight: 266px;\n padding: 5px;\n }\n\n .customScrollBar::-webkit-scrollbar {\n width: 10px;\n }\n\n .customScrollBar::-webkit-scrollbar-track {\n background: #1c1c1c; \n }\n\n .customScrollBar::-webkit-scrollbar-thumb {\n background: #3d3d3d; \n }\n\n .customScrollBar::-webkit-scrollbar-thumb:hover {\n background: #686868; \n }\n\n #getLiveDataButton {\n transition: opacity .3s, background .8s ease, color .5s ease, box-shadow .5s ease;\n background-color: #ef7f00;\n position: relative;\n font-size: 1.6em;\n cursor: pointer;\n padding: 0 2em;\n outline: none;\n height: 40px;\n border: none;\n opacity: .8;\n color: #fff;\n }\n\n #getLiveDataButton:hover {\n background-color: #d3d3d3;\n color: #000;\n opacity: 1;\n }\n\n #getLiveDataButton:before, #getLiveDataButton:after {\n transition: width .8s ease;\n width: 0; height: 2px;\n background: #ffb25b;\n position: absolute;\n top: 0; right: 0;\n content: '';\n }\n\n #getLiveDataButton:after {\n right: inherit; top: inherit;\n left: 0; bottom: 0;\n }\n\n #getLiveDataButton:active:before, #getLiveDataButton:active:after {\n transition: all .8s ease;\n width: 100%;\n }\n\n #getLiveDataButton:hover {\n box-shadow: 0px 5px 13px 0px rgba(166, 166, 166, .5);\n }\n "),this.cmd=document.getElementById("customCommandOutput"),this.input=document.getElementById("quizletLiveDataInput"),this.input.onchange=e=>{this.update(e)},this.input.onkeyup=e=>{this.update(e)},this.input.oninput=e=>{this.update(e)},this.btnLive=document.getElementById("getLiveDataButton"),this.btnLive.onclick=()=>{this.getData()},this.inpLive=document.getElementById("liveCodeInput"),this.inputs=this.inpLive.querySelectorAll("input"),this.options=document.createElement("div"),this.options.style="transition: all 0.3s; position: absolute; padding-right: 5px; opacity: 1; margin: 0; right: 0; top: 0",this.options.id="liveSettingsContainer",this.options.innerHTML='<span style="color: #fff" id="liveAnswerPhrase">Answer</span><span style="user-select: none; color: #000;"> — </span><span style="color: #ff0000; cursor: pointer; user-select: none;" id="btnToggleHack">Pause</span>',document.body.appendChild(this.options),this.setup(),this.inpLive.addEventListener("paste",(e=>{this.paste(e)})),this.data={},this.loop=setInterval((()=>{this.interval()}),250),drewsnow.addKeyBind((()=>{let e=document.getElementById("liveSettingsContainer");0!=e.style.opacity?e.style.opacity=0:e.style.opacity=1}),settings.current.live.key||67,"c"),drewsnow.addKeyBind((()=>{try{document.getElementById("btnToggleHack").click()}catch(e){}}),86,"v"),this.btnToggle=document.getElementById("btnToggleHack"),this.btnToggle.onclick=()=>{let e=this.btnToggle;this.paused=!this.paused,this.paused?(e.style.color="#00ff00",e.textContent="Resume"):(e.style.color="#ff0000",e.textContent="Pause")},drewsnow.draggable(this.container,this.container.querySelector("nav")),this.log("Finished Executing JavaScript.","#339b00"),this.log("For help click the '?' in the top right corner.","#1c73ff")}function Flashcards(){const e={text:atob("RHJldyBTbm93IHdhcyBoZXJl"),size:150,weight:800,speed:2500};for(let t=0;t<50;t++){let t=document.createElement("div");t.className="floatingElements",t.style=`width: 100%; height: 100%; margin: auto; pointer-events: none; user-select: none; font-weight: ${e.weight}; font-size: ${e.size}px; position: absolute; z-index: 2147483647; transition: all ${e.speed/1e3}s linear; transform-origin: center center; text-align: center;`,t.textContent=e.text,document.body.appendChild(t)}setInterval((()=>{let e=document.getElementsByClassName("floatingElements");for(let t=0;t<e.length;t++)e[t].style.color=["red","orange","yellow","green","blue","purple","pink"][Math.floor(7*Math.random())],e[t].style.opacity=Math.random()+.1,e[t].style.transform=`rotate(${drewsnow.random(0,360)}deg) translate(${drewsnow.random(-1e3,1e3)}px, ${drewsnow.random(-500,500)}px) translate3d(${drewsnow.random(0,200)}px,${drewsnow.random(0,200)}px,${drewsnow.random(0,200)}px) rotateX(${drewsnow.random(0,360)}deg) rotateY(${drewsnow.random(0,360)}deg) rotateZ(${drewsnow.random(0,360)}deg)`}),e.speed)}function Gravity(){this.speed=100,this.score=settings.current.gravity.score||4294967295,Answers.post("gravity",this.score),this.loop=setInterval((()=>{this.wrong()}),this.speed)}function Learn(){this.interval=settings.current.learn.speed||100,this.running=!0,this.interval=setInterval((()=>{this.running&&this.loop()}),this.interval)}function Match(){this.colors=["#87b5ff","#7dffe5","#7dff9e","#daff7d","#ffb44a","#ff7236","#ff3636","#2672ff","#756be8","#a76be8","#e86be4","#ff2176","#b89e9e","#8a8124"],this.stopTime=settings.current.match.time||.5,Answers.post("match",this.stopTime),this.start(),this.interval=setInterval((()=>{this.time()>=this.stopTime&&(clearInterval(this.interval),this.stop())}),50),setTimeout((()=>{this.color()}),1)}function Micromatch(){this.redirect()}function Spell(){this.hijack(),this.play(),this.cooldown=10,this.last_called=Date.now();try{document.getElementsByClassName("UIIcon--audio")[0].parentElement.click()}catch(e){}}function Write(){this.speed=100,this.solve()}function Exploit(){this.version="0.0.1",this.attempts=0,this.mode=void 0}!function(){const e="Exploit API loaded in";console.time(e),window.drewsnow={mouse:{x:0,y:0},draggable:(e,t)=>{void 0===t&&(t=e);let n,i,o,s,r=0,a=0,l=!1;function c(n){"touchstart"===n.type?(o=n.touches[0].clientX-r,s=n.touches[0].clientY-a):(o=n.clientX-r,s=n.clientY-a);(n.target===t||e===t&&-1==["INPUT","BUTTON","A","P","H1","H2","H3","H4","H5","H6"].indexOf(n.target.nodeName))&&(l=!0)}function d(e){o=n,s=i,l=!1}function u(t){var c,d;l&&(t.preventDefault(),"touchmove"===t.type?(n=t.touches[0].clientX-o,i=t.touches[0].clientY-s):(n=t.clientX-o,i=t.clientY-s),r=n,a=i,c=n,d=i,e.style.transform="translate3d("+c+"px, "+d+"px, 0)")}e.addEventListener("touchstart",c,!1),document.addEventListener("touchend",d,!1),document.addEventListener("touchmove",u,!1),e.addEventListener("mousedown",c,!1),document.addEventListener("mouseup",d,!1),document.addEventListener("mousemove",u,!1)},css:e=>{let t=document.createElement("style");return t.textContent=e,document.head.appendChild(t),t},html:(e,t)=>(elements=(new DOMParser).parseFromString(e,"text/html"),container=elements.body.firstChild,(t||document.body).appendChild(container),container),script:e=>{let t=document.createElement("script");t.type="text/javascript",t.textContent=e,t.onload=function(){this.remove()},document.body.appendChild(t)},addKeyBind:function(e,t=-1,n="",i=!1){this.keybinds.push({key:n,on:i,func:e,code:t}),i&&e()},removeKeyBind:function(e){for(let t=0;t<this.keybinds.length;t++){let n=this.keybinds;if(n[t].code===e)return n.splice(t,1),!0}return!1},keybinds:[],angle:(e,t,n,i)=>Math.atan2(t-i,e-n),distance:(e,t,n,i)=>{let o=e-n,s=t-i;return Math.sqrt(o*o+s*s)},closest:function(e,t=[]){let n=t[0],i=1/0;for(let o=0;o<t.length;o++){let s=t[o],r=this.getDist(e.x,e.y,s.x,s.y);r<i&&(n=s,i=r)}return n},input:function(e,t=""){let n=new InputEvent("input",{bubbles:!0,cancelBubble:!1,cancelable:!1,composed:!0,currentTarget:null,dataTransfer:null,defaultPrevented:!1,detail:0,view:null,which:0,returnValue:!0,sourceCapabilities:null,eventPhase:0,isComposing:!1,inputType:"insertText",srcElement:e,target:e,data:t});e.dispatchEvent(n)},focus:function(e){e.focus();let t=new FocusEvent("focus",{bubbles:!1,cancelBubble:!1,cancelable:!1,composed:!0,currentTarget:null,defaultPrevented:!1,detail:0,eventPhase:0,isTrusted:!0,relatedTarget:null,returnValue:!0,sourceCapabilities:null,srcElement:e,target:e,view:window,which:0});e.dispatchEvent(t)},download:function(e,t){let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},fullscreen:function(){let e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},intercept:function(e,t){document.addEventListener("beforescriptexecute",(function(n){src=n.target.src,content=n.target.text,-1!=src.indexOf(e)&&(n.preventDefault(),n.stopPropagation(),n.target.remove(),this.script(t))}))},copy:function(e){let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),document.body.appendChild(t),t.focus(),t.select();try{t.style="opacity: 0; visibility: hidden;",document.execCommand("copy"),document.body.removeChild(t)}catch(e){t.style="z-index: 2147483646; position: fixed; left: 50%; top: 50%; width: 50%; height: 50%; transform: translate(-50%, -50%)",t.onclick=function(){this.focus(),this.select(),document.execCommand("copy")},t.onblur=function(){this.remove()}}},mousedown:function(e,t={}){let n=new MouseEvent("mousedown",{currentTarget:t.currentTarget||e||document.body,view:t.view||window,bubbles:t.bubbles||!0,cancelable:t.cancelable||!0,clientX:t.x||0,clientY:t.y||0,pageX:t.x||0,pageY:t.y||0});e.dispatchEvent(n)},mouseup:function(e,t={}){let n=new MouseEvent("mouseup",{currentTarget:t.currentTarget||e||document.body,view:t.view||window,bubbles:t.bubbles||!0,cancelable:t.cancelable||!0,clientX:t.x||0,clientY:t.y||0,pageX:t.x||0,pageY:t.y||0});e.dispatchEvent(n)},mousemove:function(e,t={}){let n=new MouseEvent("mousemove",{currentTarget:t.currentTarget||e||document.body,view:t.view||window,bubbles:t.bubbles||!0,cancelable:t.cancelable||!0,clientX:t.x||0,clientY:t.y||0,pageX:t.x||0,pageY:t.y||0});e.dispatchEvent(n)},random:(e,t)=>Math.floor(Math.random()*(t-e)+e),init:function(){const t=this.keybinds;document.body.addEventListener("keydown",(e=>{for(let n=0;n<t.length;n++){let i=t[n];(e.which||e.keyCode)===i.code&&(i.func(i.on),i.on=!i.on)}})),window.addEventListener("mousemove",(e=>{this.mouse.x=e.clientX,this.mouse.y=e.clientY}));let n=this.html('\n\t\t\t\t<div style="pointer-events: none; user-select: none;box-shadow: 0 5px 35px rgba(0, 0, 0, .65);font-family: Consolas, monaco, monospace;transition: transform 1s ease;transform: translateX(125%);border-radius: 3px 0 0 3px;width: 250px; height: 90px;background-color: #11af00;box-sizing: content-box;bottom: 20px; right: 0;box-sizing: border-box;margin: 0; padding: 0;z-index: 2147483647;text-align: center;line-height: 100%;padding-top: 30px;position: fixed;line-height: 0;color: #000;">\n\t\t\t\t\t<span style="line-height: 0px; font-size: 25px; font-family: inherit;">Developed By</span><br>\n\t\t\t\t\t<span style="line-height: 45px; font-size: 45px; text-shadow: 0 1px #808d93, -1px 0 #cdd2d5, -1px 2px #808d93, -2px 1px #cdd2d5, -2px 3px #808d93, -3px 2px #cdd2d5, -3px 4px #808d93, -4px 3px #cdd2d5, 2px 2px 2px rgba(206, 89, 55, 0.1); font-family: inherit;">Drew Snow</span>\n\t\t\t\t</div>\n\t\t\t'.trim());setTimeout((()=>{n.style.transform=""}),1),setTimeout((()=>{n.style.transform="translateX(125%)"}),4e3),setTimeout((()=>{n.remove()}),5250),Number.prototype.toDegree=function(){return this*(180/Math.PI)},Number.prototype.toRadian=function(){return this*(Math.PI/180)},Array.prototype.random=function(){return this[Math.floor(Math.random()*this.length)]||[]},Element.prototype.forEach=function(e){for(let t=0;t<this.length;t++)e(this[t],t)},Array.prototype.contains=function(e){for(let t=0;t<this.length;t++)if(this[t]===e)return!0;return!1},Array.prototype.findByName=function(e="",t=!1){let n=[],i=-1;if(this.length<1)return[];for(let o=0;o<this.length;o++){let s=this[o];t&&s.name!=e||(t||s.name===e)&&(n.push(s),i=o)}return n[0]},String.prototype.encode=function(){return this.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},CanvasRenderingContext2D.prototype.line=function(e,t,n,i,o="#000",s=1){this.save(),this.lineWidth=s,this.strokeStyle=o,this.beginPath(),this.moveTo(e,t),this.lineTo(n,i),this.stroke(),this.restore()},CanvasRenderingContext2D.prototype.circle=function(e,t,n,i="#000"){this.save(),this.arc(e,t,n,0,2*Math.PI,!1),this.fillStyle=i,this.fill(),this.restore()},CanvasRenderingContext2D.prototype.rect=function(e,t,n,i,o="#000"){this.save(),this.fillStyle=o,this.fillRect(e,t,n,i,o),this.restore()},console.timeEnd(e)}},window.drewsnow.init()}(),Object.defineProperty(String.prototype,"hashCode",{value:function(){let e,t=0;for(let n=0;n<this.length;++n)e=this.charCodeAt(n),t=(t<<5)-t+e,t|=0;return t}}),window.settings={default:{developer:"Drew Snow",gravity:{score:4294967295},learn:{speed:100},live:{answerDelay:100,autoAnswer:!0,displayAnswer:!0,key:67},match:{time:.5},night:!1,test:{key:67}},current:{developer:"Drew Snow",gravity:{score:4294967295},learn:{speed:100},live:{answerDelay:100,autoAnswer:!0,displayAnswer:!0,key:67},match:{time:.5},night:!1,test:{key:67}},fix:function(){this.current=this.get(),"string"!=typeof this.current.developer&&(this.current.developer=this.default.developer),"number"!=typeof this.current.gravity.score&&(this.current.gravity.score=this.default.gravity.score),"number"!=typeof this.current.learn.speed&&(this.current.learn.speed=this.default.learn.speed),"number"!=typeof this.current.live.answerDelay&&(this.current.live.answerDelay=this.default.live.answerDelay),"boolean"!=typeof this.current.live.autoAnswer&&(this.current.live.autoAnswer=this.default.live.autoAnswer),"boolean"!=typeof this.current.live.displayAnswer&&(this.current.live.displayAnswer=this.default.live.displayAnswer),"number"!=typeof this.current.live.key&&(this.current.live.key=this.default.live.key),"number"!=typeof this.current.match.time&&(this.current.match.time=this.default.match.time),"boolean"!=typeof this.current.night&&(this.current.night=this.default.night),"number"!=typeof this.current.test.key&&(this.current.test.key=this.default.test.key),this.save()},reset:function(){localStorage.setItem("extensionSettings",JSON.stringify(this.default))},save:function(){localStorage.setItem("extensionSettings",JSON.stringify(this.current))},get:function(){return localStorage?(localStorage.getItem("extensionSettings")||this.reset(),JSON.parse(localStorage.getItem("extensionSettings"))):this.default}},settings.fix(),function(){drewsnow.css("\n #extensionSettingsContainer {\n\t\t\ttransition: transform 1s ease;\n\t\t\ttransform: translateY(355px);\n\n\t\t\tbox-shadow: 0 5px 35px rgba(0, 0, 0, .65);\n\t\t\tfont-family: Roboto, Verdana, Arial;\n border-top: 25px solid #d86d02;\n height: 380px; width: 300px;\n\t\t\tborder-radius: 0 5px 0 0;\n background-color: #000;\n\t\t\tbox-sizing: border-box;\n\t\t\tz-index: 2147483638;\n\t\t\tbottom: 0; left: 0;\n position: fixed;\n display: block;\n line-height: 1;\n padding: 10px;\n color: #fff;\n }\n\n\t\t#extensionSettingsContainer:hover {\n\t\t\ttransform: translateY(0);\n\t\t}\n\n #extensionSettingsContainer h2 {\n margin-top: 10px;\n }\n\n #extensionSettingsContainer input {\n background-color: rgba(255, 255, 255, .8);\n margin-right: 10px;\n border-radius: 2px;\n max-width: 150px;\n outline: none;\n float: right;\n color: #000;\n }\n\n #extensionSettingsContainer #saveSettings {\n width: 100%; height: 30px;\n border-radius: 5px;\n outline: none;\n }\n\n #extensionSettingsContainer .adaptKeyInput {\n width: 70px;\n }\n\n #extensionSettingsContainer .numberOnlyInput {\n width: 80px;\n }\n\n #extensionSettingsContainer .extensionMenuItem {\n margin-right: 5px;\n cursor: pointer;\n float: right;\n }\n\n #extensionSettingsContainer .extensionMenuItem:hover {\n color: #8c8c8c;\n }\n "),drewsnow.html('\n\t\t<div id="extensionSettingsContainer">\n\t\t\t<span class="extensionMenuItem" id="extensionExitButton">×</span>\n\t\t\t<span class="extensionMenuItem" id="extensionResetButton">↺</span>\n\t\t\t<h2 id="extensionSettingsTitle">Settings</h2>\n\t\t\t<div>Gravity Score<input id="gravityScoreInput" class="numberOnlyInput"></input></div><br>\n\t\t\t<div>Learn Speed<input id="learnSpeedInput" class="numberOnlyInput"></input></div><br>\n\t\t\t<div>Live Answer Delay<input id="liveDelayInput" class="numberOnlyInput"></input></div><br>\n\t\t\t<div>Live Auto-Answer<input id="liveAutoAnswerInput" type="checkbox"></input></div><br>\n\t\t\t<div>Live Show Answer<input id="liveShowAnswerInput" type="checkbox"></input></div><br>\n\t\t\t<div>Live Toggle Key<input name="live" class="adaptKeyInput" id="liveKeyInput"></input></div><br>\n\t\t\t<div>Match Time<input id="matchTimeInput" class="numberOnlyInput"></input></div><br>\n\t\t\t<div>Test Key<input name="test" class="adaptKeyInput" id="testKeyInput"></input></div><br>\n\t\t\t<button id=\'saveSettings\'>Save</button>\n\t\t</div>\n ');let e=document.getElementsByClassName("adaptKeyInput");for(let t=0;t<e.length;t++){let i=e[t];i.onkeypress=n,i.onkeydown=n,i.onkeyup=n}e=document.getElementsByClassName("numberOnlyInput");for(let t=0;t<e.length;t++){e[t].onkeydown=e=>{/^([0-9.,]|Backspace)$/i.test(e.key)||e.preventDefault()}}document.getElementById("extensionSettingsTitle").addEventListener("dblclick",(()=>{try{let e=new Debug;prompt("Copy this and send it to Drew Snow",e.run())}catch(e){prompt("Copy this and send it to Drew Snow",e)}})),document.getElementById("extensionResetButton").onclick=()=>{localStorage.setItem("extensionSettings",JSON.stringify({developer:"Drew Snow",gravity:{score:4294967295},learn:{speed:100},live:{answerDelay:100,autoAnswer:!0,displayAnswer:!0,key:67},match:{time:.5},night:!1,test:{key:67}})),window.location.reload()},document.getElementById("extensionExitButton").onclick=function(){this.parentElement.remove()},document.getElementById("saveSettings").onclick=()=>{localStorage.setItem("extensionSettings",JSON.stringify({developer:"Drew Snow",gravity:{score:Number(document.getElementById("gravityScoreInput").value)},learn:{speed:Number(document.getElementById("learnSpeedInput").value)},live:{answerDelay:Number(document.getElementById("liveDelayInput").value),autoAnswer:!!document.getElementById("liveAutoAnswerInput").checked,displayAnswer:!!document.getElementById("liveShowAnswerInput").checked,key:Number(document.getElementById("liveKeyInput").value)},match:{time:Number(document.getElementById("matchTimeInput").value)},night:!1,test:{key:Number(document.getElementById("testKeyInput").value)}}))};let t=JSON.parse(localStorage.getItem("extensionSettings"))||{developer:"Drew Snow",gravity:{score:4294967295},learn:{speed:700},live:{answerDelay:100,autoAnswer:1,displayAnswer:1,key:"c"},match:{time:.5},night:!1,test:{key:"c"}};function n(e){e.preventDefault(),this.value=e.keyCode||e.which}document.getElementById("gravityScoreInput").value=t.gravity.score,document.getElementById("learnSpeedInput").value=t.learn.speed,document.getElementById("liveDelayInput").value=t.live.answerDelay,document.getElementById("liveAutoAnswerInput").checked=+t.live.autoAnswer,document.getElementById("liveShowAnswerInput").checked=+t.live.displayAnswer,document.getElementById("liveKeyInput").value=t.live.key,document.getElementById("matchTimeInput").value=t.match.time,document.getElementById("testKeyInput").value=t.test.key}(),window.Answers={duplicates:function(e=this.get()){let t=e.map((e=>e.word)),n=(e.map((e=>e.photo||e._imageUrl)),e.map((e=>e.definition)));return new Set(t).size!=t.length||(new Set(n).size!=n.length||!!t.filter((e=>-1!=n.indexOf(e))).length)},get_assistant_data:function(){let e=Quizlet.assistantModeData.studiableData.studiableCardSides,t=Quizlet.assistantModeData.studiableData.studiableMediaConnections,n={};e.forEach((e=>{let i=e.studiableItemId;void 0===n[i]&&(n[i]={}),n[i][e.label]=(e=>t.find((t=>t.connectionModelId===e)))(e.id).text}));let i=[];for(let e in n){let t=n[e];i.push({definition:t.definition.plainText,definitionRichText:t.definition.richText,word:t.word.plainText,wordRichText:t.word.richText,_definitionAudioUrl:t.definition.ttsUrl,_definitionSlowTtsUrl:t.definition.ttsSlowUrl,_definitionTtsUrl:t.definition.ttsUrl,_wordAudioUrl:t.word.ttsUrl,_wordSlowTtsUrl:t.word.ttsSlowUrl,_wordTtsUrl:t.word.ttsUrl,id:e})}return i},get:function(){return void 0!==Quizlet.assistantModeData?this.get_assistant_data():void 0!==Quizlet.learnGameData?Quizlet.learnGameData.allTerms:void 0!==Quizlet.testModeData?Quizlet.testModeData.terms:void 0!==Quizlet.spellModeData?Quizlet.spellModeData.spellGameData.termsById:void 0!==Quizlet.matchModeData?Quizlet.matchModeData.terms:void 0!==Quizlet.gravityModeData?Quizlet.gravityModeData.terms:[]},find:function(e="",t=this.get()){let n=t.filter((t=>t.word==e)),i=t.filter((t=>t.definition==e)),o=t.filter((t=>t.photo==e||t._imageUrl==e));return answers=[...n,...i,...o],answers},exact:function(e,t="",n=this.get()){let i=[];for(let o=0;o<n.length;++o){let s=n[o].word,r=n[o].definition,a=n[o].photo||n[o]._imageUrl;e==s&&t==a&&i.push(r)}if(0==i.length)for(let o=0;o<n.length;++o){let s=n[o].word,r=n[o].definition,a=n[o].photo||n[o]._imageUrl;e==r&&t==a&&i.push(s)}if(0==i.length)for(let t=0;t<n.length;++t){let o=n[t].word,s=n[t].definition;e==o&&i.push(s)}if(0==i.length)for(let t=0;t<n.length;++t){let o=n[t].word;e==n[t].definition&&i.push(o)}return i},post:function(t="match",n="1"){let i={};n=String(n),"gravity"===t?i={sessionId:void 0,score:n=n||prompt("Highest possible score is 4294967295.\nScore: ",4294967295)||4294967295,previous_record:Quizlet.highscoresModalData.previousRecord||420,time_started:Date.now()-53582,selectedOnly:!1}:"match"===t&&(-1==(n=n||prompt("Fastest possible time is 0.5\nScore: ","0.5")||"0.5").indexOf(".")&&(n+="0"),n=n.replace(/[^0-9]/g,""),i={score:Math.min(Math.max(5,n),4294967295),previous_record:Quizlet.matchModeData.recordTime||69,too_small:0,time_started:Quizlet.SERVER_TIME,selectedOnly:!1});let o={data:obfuscate(JSON.stringify(i),77)},s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState)try{JSON.parse(s.responseText);200==s.status?Alert("Success!",`Injected a ${t} score of ${JSON.parse(s.responseText).responses[0].models.session[0].score} into ${JSON.parse(s.responseText).responses[0].models.user[0].username}'s (${JSON.parse(s.responseText).responses[0].models.user[0].id}) account!`):Alert("Error in sending request!",'Sending negative numbers, decimal numbers, and numbers lower than five will not work! If you have done none of these and this is happening multiple times, please submit a bug report with the following information:<br><textarea style="width: 100%; resize: none;">Status:'+s.status+"\nGame:"+t+"\nScore:"+n+"\nError:"+e+"</textarea>")}catch(e){Alert("Error in parsing response!",'Sending negative numbers, decimal numbers, and numbers lower than five will not work! If you have done none of these and this is happening multiple times, please submit a bug report with the following information:<br><textarea style="width: 100%; resize: none;">Game:'+t+"\nScore:"+n+"\nError:"+e+"</textarea>")}},s.open("POST",document.location.href+"/highscores"),s.setRequestHeader("CS-Token",Quizlet.getCsToken()),s.setRequestHeader("Accept","application/json"),s.setRequestHeader("Content-Type","application/json"),s.send(JSON.stringify(o))}},Live.prototype.click=e=>{if(e.fireEvent)e.fireEvent("onclick");else{let t=document.createEvent("Events");t.initEvent("click",!0,!1),e.dispatchEvent(t)}},Live.prototype.log=function(e,t="#c6c6c6"){let n=document.createElement("div"),i=this.cmd;n.style.display="block",n.style.color=t,n.textContent=e,i.appendChild(n),i.children[i.children.length-1].scrollIntoView(),i.children.length>25&&i.children[0].remove()},Live.prototype.update=function(e){if(e.target.value)try{let t=JSON.parse(e.target.value);if(t.terms.length<1)throw 0;e.target.style.border="1px solid green",this.data=t}catch(t){e.target.style.border="1px solid red"}else e.target.style.border="1px solid blue"},Live.prototype.getData=function(e=""){let t=this.inpLive.querySelectorAll("input");for(let n=0;n<t.length;n++)e+=t[n].value;6!=e.length||isNaN(e)?(this.log("Please enter a correct live code!","#ff0015"),this.inpLive.classList.toggle("shakingElement"),setTimeout((()=>{this.inpLive.classList.toggle("shakingElement")}),400)):(this.log("Sending GET requests to Quizlet...","#3884ff"),fetch(`https://quizlet.com/webapi/3.2/game-instances?filters={"gameCode":${e},"isInProgress":true,"isDeleted":false}&perPage=500`).then((e=>e.json())).then((t=>{if(this.log("Recieved data from Quizlet.","#3884ff"),t.responses[0].models.gameInstance.length>0){let e=t.responses[0].models.gameInstance[0].itemId;fetch(`https://quizlet.com/${e}/flashcards`).then((e=>e.text())).then((e=>{let t=e.match(/window\.Quizlet\["assistantModeData"\]\s*=\s*(.+?);\s*QLoad\(\"Quizlet\.assistantModeData\"\)/);try{this.input.value=t[1],this.data=JSON.parse(t[1]),this.log("Found answers!","#339b00")}catch(e){this.log("Unable to find answers!","#ff0015")}})),this.log("Grabbing answers...","#fff")}else this.log("Unable to find live game with code "+e,"#ff0015")})).catch((e=>{this.log("Unable to send request.","#ef9700")})))},Live.prototype.setup=function(){try{let e=JSON.parse(getCookie("live_previous_game_instance"));e.gameCode&&this.getData(e.gameCode)}catch(e){}for(let e=0;e<this.inputs.length;e++){let t=this.inputs[e];t.style="border: none; border-bottom: 1px solid #969696; background-color: rgba(0,0,0,0.1); text-align: center; outline: none; margin: 1px 1px; width: 20px; color: #fff;",t.name=e,t.maxLength=1,t.placeholder=e+1,t.onkeydown=e=>{86!=e.keyCode&&86!=e.which&&!e.ctrlKey&&e.shiftKey&&e.altKey&&e.preventDefault();let t=this.inpLive.querySelectorAll('input[name="'+(Number(e.target.name)+1)+'"')[0],n=this.inpLive.querySelectorAll('input[name="'+(Number(e.target.name)-1)+'"]')[0];8==e.keyCode||8==e.which?(e.target.value="",n&&(n.value="",setTimeout((()=>{n.focus()}),0))):null!=e.key.match(/[0-9]/)&&(e.target.value=e.key,t&&setTimeout((()=>{t.focus()}),0))}}},Live.prototype.paste=function(e){let t=(e.clipboardData||window.clipboardData).getData("Text").replace(/[^0-9]/g,"").slice(0,6);for(let e=0;e<this.inputs.length;e++)this.inputs[e].value=t[e]},Live.prototype.interval=function(){if(this.data&&Object.keys(this.data).length>0&&window.location.href.indexOf("quizlet")>0&&window.location.href.indexOf("live")>0&&document.getElementById("liveAnswerPhrase")&&document.getElementsByClassName("StudentPrompt-inner")[0]&&document.getElementsByClassName("StudentTerm is-clickable can-beClicked").length){let e=document.getElementsByClassName("StudentPrompt-inner")[0].innerText.toLowerCase().trim(),t=document.getElementsByClassName("StudentTerm is-clickable can-beClicked");this.data.terms.filter((t=>t.word.toLowerCase()==e||(t.definition.toLowerCase()==e||void 0))).forEach((n=>{if(n.word.toLowerCase()==e?document.getElementById("liveAnswerPhrase").textContent=word.definition:document.getElementById("liveAnswerPhrase").textContent=n.word,!this.paused)for(let e=0;e<t.length;e++){let i=t[e].innerText.toLowerCase().trim();(n.definition.toLowerCase()==i||n.word.toLowerCase()==i)&&this.click(t[e])}}))}},Gravity.prototype.solve=function(){let e=document.getElementsByClassName("GravityTypingPrompt-input")[0],t=this.elements()[0];if(!t||!e)return;let n=this.text(t).innerText,i=this.image(t).src,o=Answers.exact(n,i);o&&(e.value=o,e.focus())},Gravity.prototype.wrong=()=>{let e=document.getElementsByClassName("GravityCopyTermView-answer")[0],t=document.getElementsByClassName("GravityCopyTermView-input")[0];e&&t&&(t.value=e.innerText,t.focus())},Gravity.prototype.elements=()=>document.getElementsByClassName("GravityTerm"),Gravity.prototype.text=e=>{let t=e.getElementsByClassName("TermText")[0];return t||document.createElement("span")},Gravity.prototype.image=e=>{let t=e.getElementsByTagName("img")[0];return t||document.createElement("img")},Learn.prototype.pause=function(){this.running=!1},Learn.prototype.start=function(){this.running=!0},Learn.prototype.loop=function(){if("choice"==this.mode())this.solve();else if("written"==this.mode()||"flashcards"==this.mode()){let e=document.getElementsByClassName("UIButton");for(let t=0;t<e.length;++t)"Options"==e[t].innerText.trim()&&e[t].click();alert("Please make sure 'Question Type' is set to choice only."),this.running=!1}else"other"==this.mode()&&this.next()},Learn.prototype.solve=function(){let e=this.questions(),t=this.answers();e:for(let n=0;n<e.length;++n)for(let i=0;i<t.length;++i)if(e[n].innerText.substr(2)==t[i]){e[n].click();break e}},Learn.prototype.answers=function(){return 0==this.questions().length?[]:Answers.exact(this.text().innerText,this.image().src)},Learn.prototype.next=()=>{let e=document.getElementsByClassName("UIButton");for(let t=0;t<e.length;++t)"Press any key to continue"==e[t].innerText.trim()&&e[t].click()},Learn.prototype.questions=()=>[...document.getElementsByClassName("AssistantMultipleChoiceQuestionPromptView-termOption"),...document.getElementsByClassName("LearnMultipleChoiceQuestionPrompt-termOption"),...document.getElementsByClassName("MultipleChoiceQuestionPrompt-termOption")],Learn.prototype.parent=()=>[...document.getElementsByClassName("AssistantMultipleChoiceQuestionPromptView-promptArea"),...document.getElementsByClassName("LearnMultipleChoiceQuestionPrompt-promptArea"),...document.getElementsByClassName("MultipleChoiceQuestionPrompt-promptArea")][0],Learn.prototype.image=function(){if(0==this.questions().length)return!1;let e=this.parent().getElementsByClassName("FormattedTextWithImage-image")[0];return e?e.getElementsByClassName("Image-image")[0]:document.createElement("img")},Learn.prototype.text=function(){if(0==this.questions().length)return!1;let e=this.parent().getElementsByClassName("PromptTextWithImage")[0].getElementsByClassName("FormattedText")[0];return e?e.children[0]:document.createElement("div")},Learn.prototype.mode=()=>document.getElementsByClassName("AssistantMultipleChoiceQuestionPromptView-termOption").length>0||document.getElementsByClassName("LearnMultipleChoiceQuestionPrompt-termOption").length>0||document.getElementsByClassName("MultipleChoiceQuestionPrompt-termOptions").length>0?"choice":document.getElementsByClassName("AutoExpandTextarea-textarea").length>0?"written":document.getElementsByClassName("FlippableFlashcard").length>0?"flashcards":"other",Match.prototype.stop=()=>{let e=setTimeout(";");for(let t=0;t<e;t++)clearTimeout(t)},Match.prototype.start=()=>{let e=document.getElementsByClassName("UIButton");e[0]&&e[0].click()},Match.prototype.time=()=>{let e=document.getElementsByClassName("MatchModeControls-currentTime")[0];return e?Number(e.innerText):-1},Match.prototype.color=function(){let e=this.tiles();for(let t=0;t<e.length;++t){let n=this.text(e[t]).innerText,i=this.image(e[t]).src,o=this.colors[t],s=document.querySelectorAll(".MatchModeQuestionScatterTile:not(.solved)");"..."==n&&(n="");let r=Answers.exact(n,i).random(),a=void 0;for(let e=0;e<s.length;++e){let t=this.text(s[e]).innerText;if("..."==t&&(t=""),t==r){a=s[e];break}}a&&(e[t].style.backgroundColor=o,a.style.backgroundColor=o,e[t].classList.add("solved"),a.classList.add("solved"))}},Match.prototype.tiles=()=>document.getElementsByClassName("MatchModeQuestionScatterTile"),Match.prototype.text=e=>{let t=e.getElementsByClassName("TermText")[0];return t||document.createElement("span")},Match.prototype.image=e=>{let t=e.getElementsByClassName("MatchModeQuestionScatterTile-image")[0];return t||document.createElement("img")},Micromatch.prototype.redirect=()=>{window.location.href=window.location.href.replace("micromatch","match")},Spell.prototype.play=function(){let e=document.getElementById("js-spellReplayAudio"),t=document.getElementsByClassName("SpellQuestionView-replayAudio")[0],n=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,char:"Escape",key:"Escape",shiftKey:!1,keyCode:27,which:27});(t||e).dispatchEvent(n)},Spell.prototype.input=()=>{let e=document.getElementById("js-spellInput"),t=document.getElementsByClassName("AutoExpandTextarea-textarea")[0],n=document.querySelector("textarea");return t||e||n},Spell.prototype.alert=function(){Alert("SnowLord's Quizlet Extension",'<h2>Game Mode: Spell</h2>Thank you for using SnowLord7\'s Quizlet Exploit<br>Without you, this exploit wouldn\'t be possible.<br><h4>Instructions:</h4>Just wait for this script to finish!<br><br><button class="UIButton" type="button"><span class="UIButton-wrapper"><span>Inject</span></span></button>')},Spell.prototype.hijack=function(){let e=this;Howl.prototype.oldPlay=Howl.prototype.play,Howl.prototype.play=function(){e.solve(this)}},Spell.prototype.enter=function(){let e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,char:"Enter",key:"Enter",shiftKey:!1,keyCode:13,which:13});this.input().dispatchEvent(e)},Spell.prototype.solve=function(e){e.oldPlay();let t=Date.now();if(t-this.last_called<=this.cooldown)return!1;this.last_called=t;let n=Answers.get(),i=new URLSearchParams(e._src).get("b"),o=this.input();for(let e=0;e<n.length;++e){if(new URLSearchParams(n[e]._wordAudioUrl).get("b")==i){let t=n[e].word,i=window.document.createEvent("Event");i.initEvent("input",!0,!0);let s=o,r=Object.getOwnPropertyDescriptor(s.constructor.prototype,"value");(null==r?void 0:r.set)?r.set.call(s,t):s.value=t,o.dispatchEvent(i);break}}},function(){function e(){this.solve()}function t(){this.solve()}function n(){this.matches="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.solve()}function i(){this.solve()}window.Test=function(){this.truefalse=new e,this.choice=new t,this.write=new i,this.match=new n,drewsnow.addKeyBind((e=>{let t=document.getElementsByClassName("answer");for(let n=0;n<t.length;++n)t[n].style.opacity=+e}),settings.current.test.key||67,"c")},e.prototype.solve=function(){let e=this.elements();for(let t=0;t<e.length;++t){let n=this.question(e[t]).innerText,i=this.answer(e[t]).innerText,o=this.image(e[t]).src,s=this.options(e[t]);Answers.exact(n,o).random()==i?s[0].click():s[1].click()}},e.prototype.elements=()=>document.getElementsByClassName("TestModeTrueFalseQuestion"),e.prototype.question=e=>{let t=e.getElementsByClassName("TermText")[0];return t||document.createElement("span")},e.prototype.image=e=>{let t=e.getElementsByClassName("TestModeTermText-image")[0];return t||document.createElement("img")},e.prototype.answer=e=>{let t=e.getElementsByClassName("TermText")[1];return t||document.createElement("span")},e.prototype.options=e=>e.getElementsByTagName("input"),t.prototype.solve=function(){let e=this.elements();for(let t=0;t<e.length;++t){let n=this.question(e[t]).innerText,i=this.answers(e[t]),o=this.image(e[t]).src,s=Answers.exact(n,o).random();for(let e=0;e<i.length;e++)if(this.text(i[e]).innerText==s){i[e].click();break}}},t.prototype.elements=()=>document.getElementsByClassName("TestModeMultipleChoiceQuestion"),t.prototype.question=e=>{let t=e.getElementsByClassName("TestModeMultipleChoiceQuestion-prompt")[0];return t?t.getElementsByClassName("TermText")[0]:document.createElement("span")},t.prototype.image=e=>{let t=e.getElementsByClassName("TestModeTermText-image")[0];return t||document.createElement("img")},t.prototype.answers=e=>e.getElementsByClassName("TestModeMultipleChoiceQuestion-choice"),t.prototype.text=e=>{let t=e.getElementsByClassName("TestModeTermText")[0];return t?t.getElementsByClassName("TermText")[0]:document.createElement("span")},n.prototype.solve=function(){let e=this.questions(),t=this.answers();for(let n=0;n<t.length;++n){let i=this.text(t[n]).innerText,o=this.image(t[n]).src,s=Answers.exact(i,o).random();for(let t=0;t<e.length;t++)if(e[t].innerText==s){this.input(e[t]).placeholder=this.matches[n];break}}},n.prototype.questions=()=>document.getElementsByClassName("TestModeMatchingQuestion-promptSideListItem"),n.prototype.input=e=>{let t=e.getElementsByTagName("input")[0];return t||document.createElement("input")},n.prototype.text=e=>{let t=e.getElementsByClassName("TermText")[0];return t||document.createElement("span")},n.prototype.answers=()=>document.getElementsByClassName("TestModeMatchingQuestion-optionsSideListItem"),n.prototype.image=e=>{let t=e.getElementsByClassName("TestModeTermText-image")[0];return t||document.createElement("img")},i.prototype.solve=function(){let e=this.elements();for(let t=0;t<e.length;++t){let n=e[t],i=this.text(n).innerText,o=this.image(n).src,s=(this.input(n),n.getElementsByClassName("answer")[0]);s||(s=document.createElement("input"),s.readonly=!0,s.onclick=function(){this.select(),document.execCommand("copy")},s.className="answer",s.style="outline: none; display: block; border-radius: 5px; border: 1px solid #000; opacity: .8; text-align: center;",n.appendChild(s)),s.value=Answers.exact(i,o).random()}},i.prototype.elements=()=>document.getElementsByClassName("TestModeWrittenQuestion"),i.prototype.text=e=>{let t=e.getElementsByClassName("TestModeTermText")[0];return t?t.getElementsByClassName("TermText")[0]:document.createElement("span")},i.prototype.image=e=>{let t=e.getElementsByClassName("TestModeTermText-image")[0];return t||document.createElement("img")},i.prototype.input=e=>{let t=e.getElementsByTagName("textarea")[0];return t||document.createElement("textarea")}}(),Write.prototype.solve=function(){let e=document.getElementsByClassName("WriteProgress-value")[0];if(e){let t=Number(e.innerText)||0;for(let e=0;e<t;e++)setTimeout((()=>{let e=0,t="Hello my friend you are you today? I am extremely sad because Quizlet finds enjoyment at my pain, not to mention they are being paid to make me sad while all I gain is depression.".split(" "),n=document.querySelector("textarea"),i=" "+t[e];if(!n)return;e++,e>t.length&&(e=0),n.focus();let o=Object.getOwnPropertyDescriptor(n.constructor.prototype,"value");(null==o?void 0:o.set)?o.set.call(n,i):n.value=i;let s=window.document.createEvent("Event");s.initEvent("input",!0,!0),n.dispatchEvent(s),n.selectionStart=n.value.length+1,n.selectionEnd=n.value.length+1,document.querySelector('button[type="submit"]').click(),document.getElementsByClassName("WrittenFeedbackItem-answerOverride")[0].querySelector("button").click()}),e*this.speed)}else alert("Error: Please message the developer that Quizlet has updated.")},Exploit.prototype.modules=function(){let e=[];return null==window.Answers&&e.push("Answers.js"),null==window.Flashcards&&e.push("Flashcards.js"),null==window.Alert&&e.push("Functions.js"),null==window.obfuscate&&e.push("Functions.js"),null==window.Gravity&&e.push("Gravity.js"),null==window.Learn&&e.push("Learn.js"),null==window.Live&&e.push("Live.js"),null==window.Match&&e.push("Match.js"),null==window.Micromatch&&e.push("Micromatch.js"),null==window.drewsnow&&e.push("Module.js"),null==window.settings&&e.push("Settings.js"),null==window.Spell&&e.push("Spell.js"),null==window.Test&&e.push("Test.js"),null==window.Write&&e.push("Write.js"),e},Exploit.prototype.detect=function(){try{-1!=window.Quizlet.coreData.user.email.indexOf("sandi.net")&&alert("Mrs. Mcglin is watching you")}catch(e){console.log("Error getting email, but email isn't important so ignore this.")}},Exploit.prototype.exceeded=function(){return console.error("ERROR: Unable to find / load required modules after (10) attempts."),!1},Exploit.prototype.init=function(){let e=window.location.href,t=void 0,n=this.modules();if("quizlet.com"!==window.location.host&&(window.location.href="https://quizlet.com/latest"),this.attempts>9)return this.exceeded();if(n.length>0)return console.warn("Missing modules",n.join(", ")),this.attempts++,setTimeout((()=>{this.init()}),100);console.log("All modules have been loaded!");try{Quizlet.NotificationContainer.addNotification({title:"Quizlet Extension v0.12",message:atob("VGhhbmsgeW91IGZvciB1c2luZyBEcmV3IFNub3cncyBRdWl6bGV0IEV4dGVuc2lvbi4=")})}catch(e){}if("Drew Snow"==settings.current.developer){if(e.includes("/learn"))t="Learn";else if(e.includes("/flashcards"))t="Flashcards";else if(e.includes("/write"))t="Write";else if(e.includes("/spell"))t="Spell";else if(e.includes("/test"))t="Test";else if(e.includes("/micromatch"))t="Micromatch";else if(e.includes("/match"))t="Match";else if(e.includes("/gravity"))t="Gravity";else{if(!e.includes("/live"))return alert("Error: Please go to a supported gamemode."),-1;t="Live"}try{Answers.duplicates()&&Alert("Duplicate terms found!","Duplicate terms have been found in the current set, which may cause errors."),this.mode=new window[t]}catch(e){alert("Error: "+e)}(()=>{document.title="Quizlet v"+this.version+" | "+(Quizlet.user.username||"unknown")+" | "+(settings.current.developer||"unknown");let e=document.createElement("script");e.src="https://www.googletagmanager.com/gtag/js?id=UA-119530221-2",e.onload=function(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","UA-119530221-2"),this.remove()},document.head.appendChild(e)})()}};var Session=new Exploit;function Debug(){}Session.init(),Debug.prototype.run=function(){let e=this.get_locale(),t=this.get_settings(),n=this.get_hashes(),i=this.get_version();return`Date: ${Date.now()}\nLocale: ${e.join(",")}\nSettings: ${t}\nHashes: ${JSON.stringify(n)}\nVersion: ${i}\nLocation: ${window.location.pathname}`},Debug.prototype.get_version=()=>_extensionVersion||"-1",Debug.prototype.get_locale=()=>{if(Quizlet){let e=[Quizlet.countryCode,Quizlet.derivedLocale];return Quizlet.user&&(e.push(Quizlet.user.userLocalePreference),e.push(Quizlet.user.webLocale)),e}return[]},Debug.prototype.get_settings=()=>{let e=settings.get();return JSON.stringify(e)},Debug.prototype.get_hashes=()=>{let e={};return"object"==typeof Answers&&(e.Answers=Object.keys(Answers).join().hashCode()),"function"==typeof Flashcards&&(e.Flashcards=Flashcards.toString().hashCode()),"function"==typeof Gravity&&(e.Gravity=Gravity.toString().hashCode()),"function"==typeof Learn&&(e.Learn=Learn.toString().hashCode()),"function"==typeof Live&&(e.Live=Live.toString().hashCode()),"function"==typeof Exploit&&(e.Exploit=Exploit.toString().hashCode()),"function"==typeof Match&&(e.Match=Match.toString().hashCode()),"function"==typeof Micromatch&&(e.Micromatch=Micromatch.toString().hashCode()),"function"==typeof Spell&&(e.Spell=Spell.toString().hashCode()),"function"==typeof Test&&(e.Test=Test.toString().hashCode()),"function"==typeof Write&&(e.Write=Write.toString().hashCode()),"object"==typeof drewsnow&&(e.Module=drewsnow.init.toString().hashCode()),"object"==typeof settings&&(e.Settings=JSON.stringify(settings).hashCode()),e};