Created
February 9, 2014 12:41
-
-
Save xat/8898538 to your computer and use it in GitHub Desktop.
automatic answerscript for speedsums.com: Just open the page and execute this script in your JS console.
This file contains 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
(function($) { | |
var $question = $('#question'); | |
var $answer = $('#answer'); | |
var checkInterval = 250; | |
var cheat = function() { | |
var rawVal = $question.html(); | |
rawVal = rawVal.replace(' =', '') | |
.replace('x', '*') | |
.replace('÷', '/'); | |
$answer.focus(); | |
rawVal && $answer.val(eval(rawVal)) && $answer.trigger('keyup'); | |
$answer.is(':visible') && setTimeout(cheat, checkInterval); | |
}; | |
setTimeout(cheat, checkInterval); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment