EdgenuityAuto is a simple script that automatically skips videos on Edgenuity, sends notifications when a quiz pops up, and adds a button to automatically look up answers on Brainly during quizzes.
- Automatically skips videos as soon as possible
- Allows reanswering a question immediately
- (normally you have to wait for the audio to end)
- Adds an "Open Brainly" button to quizzes and unit tests
- Sends notifications when a video ends and the user needs to answer a question.
The easiest way to run the script is to create a bookmarklet. Create a new bookmark, and set this to the URL:
javascript:(function()%7Bvar%20lastNotified%20%3D%200%0A%0Aconst%20notify%20%3D%20()%20%3D%3E%20%7B%0A%09if%20(Date.now()%20-%20lastNotified%20%3C%203000)%20return%0A%0A%09lastNotified%20%3D%20Date.now()%0A%0A%09if%20(document.querySelector(%22%23stageFrame%22).contentWindow.document.querySelector(%22%23iFramePreview%22)%20!%3D%3D%20null)%20%7B%0A%09%09var%20iframe%20%3D%20document.querySelector(%22%23stageFrame%22).contentWindow.document.querySelector(%22%23iFramePreview%22).contentWindow.document.body%0A%09%7D%20else%20%7B%0A%09%09var%20iframe%20%3D%20document.querySelector(%22%23stageFrame%22).contentWindow.document.body%0A%09%7D%0A%09if%20(iframe.querySelector(%22.quick-check%22)%20!%3D%3D%20null)%20%7B%0A%09%09const%20notification%20%3D%20new%20Notification(%22Quick%20Check!%22)%0A%09%7D%20else%20if%20(iframe.querySelector(%22.try-it%22)%20!%3D%3D%20null)%20%7B%0A%09%09const%20notification%20%3D%20new%20Notification(%22Try%20it!%22)%0A%09%7D%0A%7D%0A%0Aconst%20getQuestion%20%3D%20()%20%3D%3E%20%7B%0A%09let%20question%20%3D%20%22%22%0A%09if%20(document.querySelector(%22%23stageFrame%22)%20!%3D%3D%20null)%20%7B%0A%09%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22%23iFramePreview%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22%23iFramePreview%22).contentDocument.querySelector(%22.content%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09%09question%20%3D%20document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22%23iFramePreview%22).contentDocument.querySelector(%22.content%22).innerText%0A%09%09%09%7D%0A%09%09%7D%20else%20if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.question-container%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09question%20%3D%20document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.question-container%22).innerText%0A%09%09%7D%0A%09%7D%0A%0A%09return%20question%0A%7D%0A%0Avar%20cachedText%20%3D%20%22%22%0A%0Aconst%20edgenuityAuto%20%3D%20setInterval(()%20%3D%3E%20%7B%0A%09%2F%2Fdocument.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22%23iFramePreview%22).contentDocument.querySelector(%22iframe%22).contentDocument.querySelectorAll(%22*%22).forEach(element%20%3D%3E%20%7Belement.style.userSelect%20%3D%20%22text%22%7D)%0A%09%0A%09if%20(document.querySelector(%22%23stageFrame%22).contentWindow.API.FrameChain)%20%7B%0A%09%09document.querySelector(%22%23stageFrame%22).contentWindow.API.FrameChain.nextFrame()%20%2F%2F%20Skips%20video%20when%20possible%0A%09%7D%0A%0A%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.getElementById(%22invis-o-div%22)%20!%3D%3D%20null)%20%7B%0A%09%09document.querySelector(%22%23stageFrame%22).contentDocument.getElementById(%22invis-o-div%22).style.display%20%3D%20%22none%22%20%2F%2F%20Hides%20the%20overlay%20preventing%20you%20from%20answering%20questions%0A%09%7D%0A%0A%09let%20question%20%3D%20getQuestion()%0A%0A%09if%20(question%20!%3D%20%22%22%20%26%26%20question%20!%3D%3D%20cachedText)%20%7B%20%2F%2F%20Only%20run%20question%20code%20once%0A%09%09cachedText%20%3D%20question%0A%0A%09%09%2F%2F%20Remove%20the%20Open%20Brainly%20button%20if%20it%20exists%0A%09%09if%20(document.querySelector(%22%23stageFrame%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22).querySelector(%22%23copyQuestion%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09%09%09document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22).querySelector(%22%23copyQuestion%22).remove()%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09%2F%2F%20Create%20the%20Open%20Brainly%20button%0A%09%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09var%20button%20%3D%20document.createElement(%22a%22)%0A%09%09%09button.id%20%3D%20%22copyQuestion%22%0A%09%09%09button.href%20%3D%20%22%23%22%0A%09%09%09button.className%20%3D%20%22uibtn%20uibtn-red%20uibtn-med%20uibtn-alt%22%0A%09%09%09button.onclick%20%3D%20()%20%3D%3E%20%7B%0A%09%09%09%09window.open(%22https%3A%2F%2Fbrainly.com%2Fapp%2Fask%3Fq%3D%22%20%2B%20encodeURIComponent(getQuestion()))%0A%09%09%09%7D%0A%09%09%09button.innerText%20%3D%20%22Open%20Brainly%22%0A%09%09%09document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22).insertBefore(%0A%09%09%09%09button%2C%0A%09%09%09%09document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22).firstChild%0A%09%09%09)%0A%09%09%7D%0A%09%0A%09%09%2F%2F%20Sends%20a%20notification%20once%20manual%20input%20is%20required%0A%09%0A%09%09if%20(Notification.permission%20%3D%3D%3D%20%22granted%22)%20%7B%0A%09%09%09notify()%0A%09%09%7D%20else%20if%20(Notification.permission%20!%3D%3D%20%22denied%22)%20%7B%0A%09%09%09Notification.requestPermission().then((permission)%20%3D%3E%20%7B%0A%09%09%09%09if%20(permission%20%3D%3D%3D%20%22granted%22)%20notify()%0A%09%09%09%7D)%0A%09%09%7D%0A%09%7D%0A%7D%2C%201000)%0A%0Aconst%20killEdgenuityAuto%20%3D%20()%20%3D%3E%20%7B%0A%09if%20(edgenuityAuto%20!%3D%3D%20null)%20%7B%0A%09%09clearInterval(edgenuityAuto)%0A%09%09console.log(%22Killed%20EdgenuityAuto%22)%0A%0A%09%09if%20(document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22).querySelector(%22%23copyQuestion%22)%20!%3D%3D%20null)%20%7B%0A%09%09%09document.querySelector(%22%23stageFrame%22).contentDocument.querySelector(%22.buttons%22).querySelector(%22%23copyQuestion%22).remove()%0A%09%09%7D%0A%09%7D%20else%20%7B%0A%09%09console.log(%22EdgenuityAuto%20not%20running%22)%0A%09%7D%0A%7D%0A%0Aconsole.log(%22Started%20EdgenuityAuto%22)%7D)()%3B
If that doesn't work, you can copy the contents of edgenuity-auto.js
and paste it directly into the Inspect Element console.
On quizzes and unit tests, this script adds a helpful button to automatically look up the answer on brainly.
Keep in mind Brainly will block you after ~5 answers and either force you to watch an advertisment or pay for their premium service. These two extensions will bypass them for you.
FYI, I did not make either of these.
This script will send a notification when a video ends and the user needs to answer a question. You must allow notification permissions for this to work.