-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy pathbookmarklet.txt
2 lines (2 loc) · 6.31 KB
/
bookmarklet.txt
1
2
javascript:
var UI=document.createElement("div");UI.innerHTML='<div id="overloadPanel" style="width:300px; left: 1px; top: 1px; background-color: #282828; color: white; outline: white solid 1px; position:absolute; z-index: 99999;"><h1 style="font-size: 32px;">iReady Overload</h1><br><i>Press ctrl to hide or show this panel at any time.</i>\t<br><br><h2 style="font-size: 25px; font-style: normal !important; color: white !important;">Lesson Skipper</h2><button onclick="skipLesson()">Skip current lesson</button><br><br><h2 style="font-size: 25px; font-style: normal !important; color: white !important;">Minutes Hack</h2><button onclick="farmMinutes(this)">Farm minutes</button> <br><br><h2 style="font-size: 25px; font-style: normal !important; color: white !important;">Diagnostic Hack</h2><button onclick="diagnosticHack(this)">Enable hack</button><br><br><br><hr>This tool was created by <a href="https://github.com/ArjhanToteck/iReady-Overload">ArjhanToteck</a>.<br><br></div>';var functionsScript=document.createElement("script");function dragElement(e){var t=0,o=0,n=0,s=0;function i(e){(e=e||window.event).preventDefault(),n=e.clientX,s=e.clientY,document.onmouseup=a,document.onmousemove=r}function r(i){(i=i||window.event).preventDefault(),t=n-i.clientX,o=s-i.clientY,n=i.clientX,s=i.clientY,e.style.top=e.offsetTop-o+"px",e.style.left=e.offsetLeft-t+"px"}function a(){document.onmouseup=null,document.onmousemove=null}document.getElementById(e.id+"header")?document.getElementById(e.id+"header").onmousedown=i:e.onmousedown=i}function skipLesson(){if(window.html5Iframe||window.closereading_lesson){var e;"closereading_lesson"==document.getElementsByTagName("iframe")[0].id?(closereading_lesson.contentDocument.getElementsByClassName("button fa fa-play pulse")[0]&&closereading_lesson.contentDocument.getElementsByClassName("button fa fa-play pulse")[0].click(),e=closereading_lesson.src.split("?csid=")[1].split("#")[0]):e=html5Iframe.src.split("?csid=")[1].split("&type")[0];var t=e.includes("10_")&&"closereading_lesson"!=document.getElementsByTagName("iframe")[0].id?null:prompt("Quiz detected. What score would you like (out of 100)?",100),o=e.includes("10_")&&"closereading_lesson"!=document.getElementsByTagName("iframe")[0].id?null:`{"score":${t}}`;fetch("https://login.i-ready.com/student/lesson/componentCompleted",{headers:{accept:"*/*","accept-language":"en-US,en;q=0.9","content-type":"application/json;charset=UTF-8","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","sec-gpc":"1"},referrer:"https://login.i-ready.com/student/dashboard/home",referrerPolicy:"strict-origin-when-cross-origin",body:`{"componentStatusId":"${e}","instructionLessonOutcome":${o}}`,method:"POST",mode:"cors",credentials:"include"}),alert("Close the lesson/quiz and you should see it was skipped.")}else alert("You do not have a lesson currently open. You must open a lesson to skip it.")}function farmMinutes(e){if(minuteFarming&&(t=getCookie("csid"),fetch(`https://login.i-ready.com/student/v1/web/lesson_component/${t}?action=pause`,{headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin"},referrer:"https://login.i-ready.com/student/dashboard/home",referrerPolicy:"strict-origin-when-cross-origin",body:null,method:"GET",mode:"cors",credentials:"include"}),document.cookie='csid=; expires=Thu, 18 Dec 1970 12:00:00 UTC"',e.innerText="Farm minutes",minuteFarming=!1,alert("The minutes should now be in your account.")),window.html5Iframe){var t=html5Iframe.src.split("?csid=")[1].split("&type")[0];document.cookie=`csid=${t}; expires=Thu, 18 Dec 2999 12:00:00 UTC"`,document.cookie='minutes=45; expires=Thu, 18 Dec 2999 12:00:00 UTC"',alert("Neccessary data to farm minutes have now been collected. To begin farming minutes, go to the iReady menu by closing this lesson/quiz. Then, press this button again.")}else getCookie("csid")?(t=getCookie("csid"),fetch(`https://login.i-ready.com/student/v1/web/lesson_component/${t}?action=resume`,{headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin"},referrer:"https://login.i-ready.com/student/dashboard/home",referrerPolicy:"strict-origin-when-cross-origin",body:null,method:"GET",mode:"cors",credentials:"include"}),minuteFarming=!0,e.innerText="Stop farming minutes",alert('The minute farming proccess has now begun. Do not close this page. Do not turn off your computer. After you press "ok," every minute that passes will be added to your account. When you want to stop the timer and add the farmed minutes to your account, press the button labeled "Stop farming minutes". Press "ok" to begin.')):alert("You do not have a lesson currently open. You must open a lesson to begin the proccess.")}function diagnosticHack(e){if(XMLHttpRequest.prototype.realSend)XMLHttpRequest.prototype.send=XMLHttpRequest.prototype.realSend,XMLHttpRequest.prototype.realSend=void 0,alert("Hack was disabled."),e.innerText="Enable hack";else if("undefined"==typeof diagnosticIFrame)alert("Diagnostic not detected. Open the diagnostic first to use the hack.");else if(!XMLHttpRequest.prototype.realSend){XMLHttpRequest.prototype.realSend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){newBody=JSON.parse(e),0==newBody.correct&&(newBody.correct=!0),null!=newBody.durationSeconds&&(newBody.durationSeconds=1e3),this.realSend(JSON.stringify(newBody))},alert("Hack was enabled. All answers inputted in diagnostic will be correct. Please do not answer questions too fast or your test will be marked as rushed."),e.innerText="Disable hack"}}function getCookie(e){for(var t=e+"=",o=decodeURIComponent(document.cookie).split(";"),n=0;n<o.length;n++){for(var s=o[n];" "==s.charAt(0);)s=s.substring(1);if(0==s.indexOf(t))return s.substring(t.length,s.length)}return""}functionsScript.innerHTML=`var minuteFarming = false; ${skipLesson.toString()} \n ${farmMinutes.toString()} \n ${diagnosticHack.toString()} \n ${getCookie.toString()} document.addEventListener('keydown', function(e){ if (event.ctrlKey && "z"){ if(overloadPanel.style.display == "block"){ overloadPanel.style.display = "none"; } else { overloadPanel.style.display = "block"; } } });\n`,document.body.appendChild(functionsScript),dragElement(UI.firstElementChild),document.body.appendChild(UI);