Last active
February 24, 2024 19:14
-
-
Save Auax/2f203951446bba6f810bf46cdfd3fc1e to your computer and use it in GitHub Desktop.
Paste this into a new Tampermonkey script and press ALT + I to get the answers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name BlinkLearning Solver by Auax | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2 | |
| // @description Simple cheat for BlinkLearning! | |
| // @author Auax | |
| // @match www.blinklearning.com:/* | |
| // @icon https://www.google.com/s2/favicons?domain=blinklearning.com | |
| // @grant none | |
| // ==/UserScript== | |
| // Thanks Google Dev console! | |
| (function () { | |
| 'use strict'; | |
| console.log("RUNNING userscript by Auax"); | |
| // let classes_ = ".js-correct, .js-save, #t1-corrector, #t2-corrector, .review, .repetible"; | |
| let classes_ = ".js-correct, .js-save"; | |
| // Get solutions or hide them when pressing alt + i | |
| document.addEventListener('keydown', function (event) { | |
| if (event.altKey && event.key === 'i') { | |
| let askContinue = window.confirm("Would you like to continue? The check button will be enabled."); | |
| if (askContinue) { | |
| // Get elements using the specified classes | |
| let elements = $(classes_); | |
| // Only execute if there's elements | |
| if (elements.length > 0) { | |
| // Iterate over all of the elements | |
| elements.each(function (i, el) { | |
| // Check the element is a button | |
| if (el.tagName.toLowerCase() == "button") { | |
| el.disabled = false; // Enable element | |
| el.style.backgroundColor = "red"; // Red bg | |
| // Replace click binding method with custom func | |
| $(el).unbind("click").click(function (e) { | |
| // Magic | |
| var $this = $(this), | |
| $slide = $this.closest('.js-slide-wrapper'), | |
| prefix = 't' + $slide.data('slide-index'), | |
| slide = window[prefix + '_slide']; | |
| // Show solution | |
| slide.showSolution(); | |
| let wantToCorrect = window.confirm("Would you like to send the exercice? (Will send current values, not the correct ones)"); | |
| if (wantToCorrect) { | |
| slide.hideSolution(); | |
| correct(prefix, true, true); | |
| } | |
| alert("Reopen the exercice to unblock it."); | |
| e.preventDefault(); | |
| e.stopImmediatePropagation(); | |
| }); | |
| } | |
| }) | |
| } | |
| else { | |
| alert("Couldn't find element in 'elements' with length 0!"); | |
| } | |
| } | |
| } | |
| }); | |
| })(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, I haven’t updated it for like 2 years since I no longer have access to blink learning. So I cannot offer a solution if it doesn’t work anymore. They probably changed the website thus breaking the code I wrote.