Created
October 9, 2014 15:19
-
-
Save nakajmg/1f72c6ac3fe508c33f45 to your computer and use it in GitHub Desktop.
for game.ioxapp.com/color/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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