Skip to content

Instantly share code, notes, and snippets.

@uhtred
Created November 30, 2012 19:24
Show Gist options
  • Save uhtred/4177930 to your computer and use it in GitHub Desktop.
Save uhtred/4177930 to your computer and use it in GitHub Desktop.
AutoBets: trackMukirana Test
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="current_price_auction_1">R$ 5,00</div>
<div id="current_time_auction_1">15</div>
<div id="current_username_auction_1">nobody</div>
<button id="submit_auction_1" onclick="bet()">Lance</button>
<script type="text/javascript" src="trackMukirana.js"></script>
<script type="text/javascript">
var sec, timerStart = '15';
window.setInterval(function(){
console.log('secs');
sec = parseInt( document.querySelector('#current_time_auction_1').innerHTML, 10 );
sec--;
document.querySelector('#current_time_auction_1').innerHTML = (sec < 10 ? '0'+sec : sec ) ;
if(sec == 0){
document.querySelector('#current_time_auction_1').innerHTML = timerStart;
}
document.querySelector('#current_username_auction_1').innerHTML = 'nobody';
}, 1000);
function bet(){
document.querySelector('#current_username_auction_1').innerHTML = 'drfranca';
document.querySelector('#current_time_auction_1').innerHTML = timerStart;
}
// ----------------
//TrackMukirana.start({ max_price: 'R$ 30,00', interval: 100, auction_id: '1', seconds_limit: '10', bets_limit: 40, debug: false });
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment