Skip to content

Instantly share code, notes, and snippets.

@nakajmg
Created October 9, 2014 15:19
Show Gist options
  • Save nakajmg/1f72c6ac3fe508c33f45 to your computer and use it in GitHub Desktop.
Save nakajmg/1f72c6ac3fe508c33f45 to your computer and use it in GitHub Desktop.
for game.ioxapp.com/color/
function exec() {
var panels = $('#box').find('span');
var base = panels.eq(0);
panels.splice(0,1);
var targets = [].filter.call(panels, function(panel) {
return $(base).css('background-color') != $(panel).css('background-color');
});
if(targets.length > 1) {
$(base[0]).click();
}
else {
$(targets[0]).click();
}
}
var timer = setInterval(exec, 10);
setTimeout(function() {
clearInterval(timer);
}, 61000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment