Skip to content

Instantly share code, notes, and snippets.

@aalvesjr
Created October 23, 2012 12:44
Show Gist options
  • Select an option

  • Save aalvesjr/3938546 to your computer and use it in GitHub Desktop.

Select an option

Save aalvesjr/3938546 to your computer and use it in GitHub Desktop.
Brincando com o placar do LetsNode
/*
* Brincando com o placar do letsnode.com:8090
*
*/
function result(){
return eval(document.getElementById('operations').innerHTML);
}
function input_result() {
document.getElementsByTagName('input')[1].value = result();
}
window.setInterval(input_result, 100);
/*
* ------------------------------------------------ *
* A mesma coisa com jQuery
* ------------------------------------------------ *
*
*/
function result(){
return eval($("#operations").html());
}
function input_result() {
$('input.input_player').val(result());
}
window.setInterval(input_result, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment