ColorRun – Simple browser game about colors
colorrun.pl
colorrun.pl
function action(){
var opacity1 = $('#color-1')[0].getContext('2d').getImageData(0,0,1,1).data[3];
var opacity2 = $('#color-2')[0].getContext('2d').getImageData(0,0,1,1).data[3];
if(opacity1 > opacity2){
$('#color-1').trigger('click');
}else{
$('#color-2').trigger('click');
}
};
setInterval('action()', 100); function action(){
if($('#color-1').css('opacity') > $('#color-2').css('opacity')){
$('#color-1').trigger('click');
}else{
$('#color-2').trigger('click');
}
};
setInterval('action()',0);Is there a better way to figure out if a game is trying to hijack my history?
Minor: In the gameover pop-up the social buttons only show the facebook logo, though the links point to fb/twitter/plus