Created
June 27, 2015 12:44
-
-
Save J2TEAM/7640f1684650f367d04c to your computer and use it in GitHub Desktop.
Javascript cheat for kuku-kube.com
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
function _css(e) { | |
return $(e).css('background-color'); | |
} | |
function _mainColor() { | |
var holder = $('#box > span'), | |
mainColor = '', | |
a = _css(holder[0]), | |
b = _css(holder[1]), | |
c = _css(holder[2]); | |
if (a == b || a == c) { | |
return a; | |
} else if (b == c) { | |
return b; | |
} | |
} | |
var timer = null; // Run clearTimeout(timer) to stop | |
function _clickTarget() { | |
var mainColor = _mainColor(); | |
$('#box > span').each(function(i, el) { | |
if (_css(el) != mainColor) $(el).click(); | |
}) | |
timer = setTimeout(_clickTarget, 50); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.