Skip to content

Instantly share code, notes, and snippets.

@deptno
Last active August 29, 2015 14:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
!function(msec, count) {
function tcafe(msec) {
function simulateKeyPress(character, element) {
var e = $.Event('keypress');
e.which = 13;
$(element).trigger(e);
}
var text = $('#tzStr').text()
var target = $(".ment_show")[0];
var i = 0;
var timer = setInterval(function() {
target.value = text.substr(0, i++);
http.keyUp();
http.chkMiss();
http.chkTime();
if (i > text.length) {
clearInterval(timer);
setTimeout(function() {
simulateKeyPress(null, document);
setTimeout(function() {
if (count-- > 0) {
tcafe(msec);
}
}, 100);
}, 100);
}
}, msec || 75);
}
window.tcafe = tcafe;
tcafe(msec);
}(null, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment