Created
May 29, 2015 16:54
-
-
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/ )
This file contains 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
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