Created
June 28, 2015 06:45
-
-
Save lelinhtinh/e8927fca19acea5ab9f1 to your computer and use it in GitHub Desktop.
colorrun hack
This file contains hidden or 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
// http://colorrun.pl/ | |
// This is fun! ^^ | |
// by Zzbaivong | |
var $c1 = document.getElementById("color-1"), | |
$c2 = document.getElementById("color-2"), | |
c1, | |
c2, | |
colorrun = function() { | |
c1 = parseInt($c1.style.backgroundColor.match(/\d+/)[0], 10); | |
c2 = parseInt($c2.style.backgroundColor.match(/\d+/)[0], 10); | |
console.log(c1 + "|" + c2); | |
c1 > c2 ? $c1.click() : $c2.click(); | |
}; | |
var loop = setInterval(function() { | |
colorrun(); | |
}, 1); | |
document.getElementsByClassName('play')[0].click(); | |
// clearInterval(loop); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment