Skip to content

Instantly share code, notes, and snippets.

@J2TEAM
Created June 27, 2015 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J2TEAM/7640f1684650f367d04c to your computer and use it in GitHub Desktop.
Save J2TEAM/7640f1684650f367d04c to your computer and use it in GitHub Desktop.
Javascript cheat for kuku-kube.com
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);
}
@PATRICK1017
Copy link

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment