delaying pokes while typing

This commit is contained in:
Paul Tagliamonte 2012-12-27 22:28:06 -05:00
parent 3d7c9a68aa
commit 37aff587b4

View File

@ -15,8 +15,22 @@ function reload() {
}
$(document).ready(function() {
var count = 0;
$("#repl-input").keyup(function(e) {
var curcount;
count = count + 1;
curcount = count;
window.setTimeout(
function() {
if ( curcount == count ) {
reload();
} else {
/* Pass. User is still typing */
}
},
500
);
});
reload();
});