Created
November 16, 2011 17:43
-
-
Save hugoware/1370779 to your computer and use it in GitHub Desktop.
IMPORTANT SCRIPT
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
var script = document.createElement("script"); | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.body.appendChild(script); | |
var start_typing = function(jquery, timeout) { | |
var input = jquery(".txtInput"); | |
var do_next_phrase = function() { | |
var word = []; | |
jquery(".unselectable:first-child").find("span").each(function(i, v) { | |
var item = jquery(v); | |
var color = item.css("color"); | |
if (color.match(/rgb\(68/)) return; | |
input.focus().select(); | |
var text = item.text(); | |
input.val(text) | |
.keydown(); | |
}); | |
input.val(input.val()) | |
.keydown(); | |
}; | |
window.setInterval(do_next_phrase, timeout); | |
input.focus(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment