Skip to content

Instantly share code, notes, and snippets.

@lucascarvalho
Created May 29, 2015 16:54
Show Gist options
  • Save lucascarvalho/9e8fb3ef03e35f3ea830 to your computer and use it in GitHub Desktop.
Save lucascarvalho/9e8fb3ef03e35f3ea830 to your computer and use it in GitHub Desktop.
kuku kube dumb hack ( http://106.186.25.143/kuku-kube/en-3/ )
setInterval(function() {
var bg,
backgrounds = {};
$('#box > span').each(function (index, element) {
bg = element.style["background-color"];
if (backgrounds.hasOwnProperty(bg)) {
backgrounds[bg].qnt += 1;
} else {
backgrounds[bg] = {qnt: 1, el: element};
}
})
for (var key in backgrounds) {
if (backgrounds.hasOwnProperty(key)) {
if ( backgrounds[key].qnt == 1 ) {
(backgrounds[key].el).click();
}
}
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment