Skip to content

Instantly share code, notes, and snippets.

@hugoware
Created November 16, 2011 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugoware/1370779 to your computer and use it in GitHub Desktop.
Save hugoware/1370779 to your computer and use it in GitHub Desktop.
IMPORTANT SCRIPT
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