edgenuity auto answer pastebin // ==UserScript== // @name Edgenuity Toolkit // @namespace // @version 0.9 // @description Makes edgenuity better. // @author Ryan // @match https://r10.core.learn.edgenuity.com/Player/ // @grant all // ==/UserScript== //---------------| Settings |-------------------- edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin var autofillVocab = false; //Fill the vocabulary for you. var autoContinue = false; //Automatically move to the next slide or section. var continueOnComplete = false; //Continue when the currently playing video finishes rather than when available. var clickWhileTalking = false; //Enables the ability to click while the speaker is talking var autoAnswer = false; //Automatically hits submit button for assignments to get to the answer faster. var showInvisible = false; //Set all objects visible. var settingsMenuVisible = true; //Show the floating settings menu in edgenuity. //=================DELAYS======================== var vocabDelay = 700; var autoContinueDelay = 1000; edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin var clickWhileTalkingDelay = 700; var randomAnswersDelay = 1000; var showInvisibleDelay = 1000; var continueOnCompleteDelay= 1000; //================Button Colours================= var clrDisabled = "black"; var clrEnabled = "orange"; var clrHover = "purple"; //----------------------------------------------- edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin var vocabTimer, continueTimer, cwtTimer, randomAnswersTimer, showInvisibleTimer, continueOnCompleteTimer; var divSettings, divContainer; var btnHide, btnToggleVocab, btnToggleContinue, btnToggleCWT, btnAutoAnswer, btnShowInvis, btnTranscript, btnContinueOnComplete; var divSettingsHidden = false; edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin function createSettingsMenu() { console.log("Creating settings"); divSettings = document.createElement("div"); divContainer = document.createElement("div"); btnToggleVocab = document.createElement("button"); btnToggleContinue = document.createElement("button"); btnToggleCWT = document.createElement("button"); btnAutoAnswer = document.createElement("button"); btnShowInvisible = document.createElement("button"); edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin btnTranscript = document.createElement("button"); btnContinueOnComplete = document.createElement("button"); btnHide = document.createElement("button"); var updateButtons = function() { btnHide.style.backgroundColor = divSettingsHidden ? clrEnabled : clrDisabled; btnHide.style.color = "white"; btnHide.style.width = "100%"; divSettings.style.opacity = divSettingsHidden ? "0.03" : "0.7"; btnHide.innerHTML = divSettingsHidden ? "[+]" : "[-]"; edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin btnToggleVocab.style.backgroundColor = autofillVocab ? clrEnabled : clrDisabled; btnToggleVocab.innerHTML = "AutoVocab"; btnToggleContinue.style.backgroundColor = autoContinue ? clrEnabled : clrDisabled; btnToggleContinue.innerHTML = "AutoContinue"; btnToggleCWT.style.backgroundColor = clickWhileTalking ? clrEnabled : clrDisabled; btnToggleCWT.innerHTML = "Enable clicking"; btnAutoAnswer.style.backgroundColor = autoAnswer ? clrEnabled : clrDisabled; btnAutoAnswer.innerHTML = "Auto Answer"; btnShowInvisible.style.backgroundColor = showInvisible ? clrEnabled : clrDisabled; btnShowInvisible.innerHTML = "Show invisible"; edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin btnTranscript.style.backgroundColor = clrDisabled; btnTranscript.innerHTML = "Parse Transcript"; btnContinueOnComplete.style.backgroundColor = continueOnComplete ? clrEnabled : clrDisabled; btnContinueOnComplete.innerHTML = "next when ready"; }; updateButtons(); divSettings.style.backgroundColor = "white"; divSettings.style.width = "120px"; divSettings.style.height = "auto"; divSettings.style.zIndex = "100"; edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin divSettings.style.position = "absolute"; divSettings.style.top = "50px"; divSettings.style.left = "50%"; divSettings.style.paddingTop = "15px"; $(divSettings).draggable(); btnHide.addEventListener("click", function() { if ( divSettingsHidden ) { divContainer.style.display = "block"; divSettingsHidden = false; edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin } else { divContainer.style.display = "none"; divSettingsHidden = true; } updateButtons(); }); btnToggleVocab.addEventListener("click", function() { if ( autofillVocab ) { autofillVocab = false; clearInterval(vocabTimer); edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin } else { autofillVocab = true; clearInterval(vocabTimer); vocabLoop(); } updateButtons(); }); btnToggleContinue.addEventListener("click", function() { if ( autoContinue ) { autoContinue = false; edgenuity auto answer pastebin How to use it? edgenuity auto answer pastebin clearInterval(continueTimer); } else { autoContinue = true; continueTimer = setInterval(goNext, autoContinueDelay); } updateButtons(); }); btnContinueOnComplete.addEventListener("click", function() { if ( continueOnComplete ) { continueOnComplete = false; edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin clearInterval(continueOnCompleteTimer); } else { continueOnComplete = true; continueOnCompleteTimer = setInterval(continueWhenReady, continueOnCompleteDelay); } }); btnToggleCWT.addEventListener("click", function() { if ( clickWhileTalking ) { clearInterval(cwtTimer); clickWhileTalking = false; edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin } else { clickWhileTalking = true; cwtTimer = setInterval(enableClicking, clickWhileTalkingDelay); } updateButtons(); }); btnAutoAnswer.addEventListener("click", function() { if ( autoAnswer ) { autoAnswer = false; clearInterval(randomAnswersTimer); edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin } else { autoAnswer = true; randomAnswersTimer = setInterval(setAnswers, randomAnswersDelay); } updateButtons(); }); btnShowInvisible.addEventListener("click", function() { if ( showInvisible ) { showInvisible = false; clearInterval(showInvisibleTimer); edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin hideInvisibleItems(); } else { showInvisible = true; showInvisibleTimer = setInterval(showInvisibleItems, showInvisibleDelay); } updateButtons(); }); btnTranscript.addEventListener("click", function() { var textContent = parseTranscript(); if ( textContent !== "" ) { edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin var div = $(document.createElement('div')) .css("max-width", "700px") .css("height", "auto") .css("position", "absolute") .css("top", $(divSettings).position().top+100+"px") .css("left", $(divSettings).position().left+100+"px") .css("z-index", "1000") .css("background-color", "black") .css("padding", "20px") .append( edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin $(document.createElement('button')) .html("close") .on("click", function() { div.remove(); }) ) .draggable(); var textArea = $(document.createElement("textarea")) .css("height", "200px") .css("width", "100%") edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin .css("resize", "both") .val(textContent) .on("click", function() { $(this).select(); }); div.append(textArea); $(document.body).append(div); } }); divContainer.appendChild(btnToggleVocab); edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin divContainer.appendChild(btnToggleContinue); divContainer.appendChild(btnContinueOnComplete); divContainer.appendChild(btnToggleCWT); divContainer.appendChild(btnAutoAnswer); divContainer.appendChild(btnShowInvisible); divContainer.appendChild(btnTranscript); //Transitioned to using jquery here $(divContainer).append( $(document.createElement('button')). html("Paint it black") edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin .css("background-color", clrDisabled) .on("click", function() { $("*").not($(divSettings)) .css("background-color", "black") .css("color", "white"); }) ); $(divContainer).append( $(document.createElement('button')). html("Notepad") edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin .css("background-color", clrDisabled) .on("click", function() { var div = $(document.createElement('div')) .css("width", "auto") .css("height", "auto") .css("position", "absolute") .css("top", $(divSettings).position().top+100+"px") .css("left", $(divSettings).position().left+100+"px") .css("z-index", "1000") .css("background-color", "black") edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin .css("padding", "20px") .append( $(document.createElement('button')) .html("close") .css("display", "block") .on("click", function() { div.remove(); }) ) .draggable(); edgenuity auto answer pastebin How to use it? edgenuity auto answer pastebin var textArea = $(document.createElement("textarea")) .css("min-height", "30px") .css("resize", "both") .css("display", "block"); div.append(textArea); $(document.body).append(div); }) ); for ( var i=0; i < divContainer.childNodes.length; i++) { edgenuity auto answer pastebin How to use it? edgenuity auto answer pastebin var n = divContainer.childNodes[i]; n.style.width = "100%"; n.style.fontSize = "13px"; n.style.border = "none"; n.style.borderRadius = "1px"; n.style.color = "white"; $(n).hover(function() { $(this).css("background-color", clrHover) .css("color", "white"); }, function() { edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin $(this).css("background-color", clrDisabled); updateButtons(); }); } divSettings.appendChild(btnHide); divSettings.appendChild(divContainer); document.body.appendChild(divSettings); } function vocabLoop() { edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin try { vocabTimer = setInterval(scanVocab, vocabDelay); } catch (err) { console.log(err); } } function scanVocab() { var stage = document.getElementById("stageFrame"); var frame; edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin if ( stage ) { frame = stage.contentWindow.document; } else { return; } var vocabButton = stage.contentWindow.document.getElementsByClassName("plainbtn alt selected")[0]; if ( vocabButton ) { var vocabInput = frame.getElementsByClassName("word-textbox word-normal")[0]; if ( vocabInput ) { vocabInput.value = vocabButton.innerHTML; edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin var playbutton = frame.getElementsByClassName("playbutton vocab-play")[0]; if ( playbutton ) { playbutton.click(); } var nextButton = frame.getElementsByClassName("uibtn-arrow-next")[0]; if ( nextButton ) { nextButton.click(); } } } edgenuity auto answer pastebin How to use it? edgenuity auto answer pastebin } function continueWhenReady() { var frame = document.getElementById("stageFrame"); if ( frame ) { frame = frame.contentWindow.document; var currentTime = document.getElementsByClassName("uid1_time")[0]; if ( currentTime ) { currentTime = currentTime.innerHTML.split(" / "); edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin if ((currentTime[0] && currentTime[1]) && currentTime[0] == currentTime[1]) { goNext(); } } } } function goNext() { var footnavRight = document.getElementsByClassName("footnav goRight")[0]; edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin if ( footnavRight ) { footnavRight.click(); } var frame = document.getElementById("stageFrame"); if ( frame ) { frame = frame.contentWindow.document; var goRight = frame.getElementsByClassName("FrameRight")[0]; if ( goRight ) { var b = goRight.firstChild; if ( b ) { edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin b.click(); } } } } function enableClicking() { var frame = document.getElementById("stageFrame"); if ( frame ) { var invisodiv = frame.contentWindow.document.getElementById("invis-o-div"); edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin if ( invisodiv ) { //invisodiv.style.backgroundColor = "#00ff00"; //invisodiv.style.opacity = "0.3"; //invisodiv.style.pointerEvents = "none"; invisodiv.parentNode.removeChild(invisodiv); } var submitBlocker = frame.contentWindow.document.getElementById("submitBlocker"); if ( submitBlocker ) { submitBlocker.parentNode.removeChild(submitBlocker); } edgenuity auto answer pastebin How to dowload it? edgenuity auto answer pastebin var submitLoading = frame.contentWindow.document.getElementById("submitLoading"); if ( submitLoading ) { submitLoading.parentNode.removeChild(submitLoading); } } } function setAnswers() { var frame = document.getElementById("stageFrame"); if ( frame ) { edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin frame = frame.contentWindow.document; var preview = frame.getElementById("iFramePreview"); if ( preview ) { preview = preview.contentWindow.document; var buttons = preview.getElementsByClassName("answer-choice-button"); for( var i=0; i < buttons.length; i++ ) { buttons[i].checked = true; } var submit = frame.getElementById("btnCheck"); if ( submit ) { edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin submit.click(); console.log(submit); } } } } function showInvisibleItems() { var frame = document.getElementById("stageFrame"); if ( frame ) { edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin frame = frame.contentWindow.document; $(frame.body).find("*:hidden").not(".uibtn") .show() .addClass("sethidden"); } } function hideInvisibleItems() { var frame = document.getElementById("stageFrame"); if ( frame ) { edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin frame = frame.contentWindow.document; $(frame.body).find(".sethidden").hide(); } } function parseTranscript() { var transcripts = document.getElementsByClassName("transcript-text"); var total = ""; for ( var i=0; i < transcripts.length; i++ ) { total += transcripts[i].innerHTML.trim() edgenuity auto answer pastebin PasteShr edgenuity auto answer pastebin .replace(/( )+/g, " ") .replace("TEACHER: ", "\n\nTEACHER:\n") + " "; } return total; } (function() { 'use strict'; edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin //Generate Settings Menu if ( settingsMenuVisible ) { createSettingsMenu(); } //VOCAB if ( autofillVocab ) { vocabLoop(); } //autocontinue if ( autoContinue ) { edgenuity auto answer pastebin How to get it for free? edgenuity auto answer pastebin continueTimer = setInterval(goNext, autoContinueDelay); } //click while talking if ( clickWhileTalking ) { cwtTimer = setInterval(enableClicking, clickWhileTalkingDelay); } //autoAnswer if ( autoAnswer ) { randomAnswersTimer = setInterval(setAnswers, randomAnswersDelay); } edgenuity auto answer pastebin How to get it? edgenuity auto answer pastebin //show Invisible if ( showInvisible ) { showInvisibleTimer = setInterval(showInvisibleItems, showInvisibleDelay); } })(); edgenuity auto answer pastebin