-
-
Save vbarinov/e4f321a0832c21cf6f45 to your computer and use it in GitHub Desktop.
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
javascript:window.setInterval(function(){var c=$("#box span:first-child").css("background-color"),o=$("#box span:nth-child(2)").css("background-color");c!=o&&$("#box span:first-child").click(),$("#box span").each(function(){var o=$(this).css("background-color");return c!=o?($(this).click(),!1):void(c=o)})},10); |
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
window.setInterval(function() { | |
var firstCol = $('#box span:first-child').css('background-color'); | |
var secondCol = $('#box span:nth-child(2)').css('background-color'); | |
if (firstCol != secondCol) { | |
$('#box span:first-child').click(); | |
} | |
$('#box span').each(function(i) { | |
var curCol = $(this).css('background-color'); | |
if (firstCol != curCol) { | |
$(this).click(); | |
return false; | |
} | |
firstCol = curCol; | |
}); | |
}, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment