{"size": 1398, "ext": "js", "max_stars_repo_path": "lama.js", "max_stars_repo_name": "BlackWidow68/nuitinfo2018", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lama.js", "max_issues_repo_name": "BlackWidow68/nuitinfo2018", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lama.js", "max_forks_repo_name": "BlackWidow68/nuitinfo2018", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.1818181818, "max_line_length": 84, "alphanum_fraction": 0.6037195994}
var allowedKeys = {
  76: 'l',
  65: 'a',
  77: 'm',
  65: 'a',
};

var lamaCode = ['l', 'a', 'm', 'a'];

var lamaCodePosition = 0;

document.addEventListener('keydown', function(e) {

  var key = allowedKeys[e.keyCode];
  var lamaRequiredKey = lamaCode[lamaCodePosition];
  if (key == lamaRequiredKey) {

    lamaCodePosition++;

    if (lamaCodePosition == lamaCode.length) {
      lamaCodePosition = 0;
      lamaCheats();
    }
  } else
    lamaCodePosition = 0;
});

function lamaCheats(){
	var x = document.createElement("IMG");

	var boolImage = Math.floor(Math.random()* 10)
	if(boolImage >5)
	  x.setAttribute("src", "lama.png");
	else if(boolImage <=5)
	  x.setAttribute("src", "lama.png");

	var height =  Math.floor(Math.random()*300)+50;
	x.setAttribute("width", height);
  x.setAttribute("height", height);
  x.setAttribute("alt", "Suricate");
  x.setAttribute("id", "jeje");
  document.body.appendChild(x);
  x.style.position = 'fixed';
  x.style.top = "-300px";
  x.style.left = Math.floor(Math.random()*(document.body.clientWidth - 250)) + "px";
  var pos = -300;
  var opa = 1.0;
  var id = setInterval(frame, -400);

  function frame() {
  	x.style.top = pos + 0.5 + "px";

  	pos = pos + 0.5 ;

  	if (pos >screen.height - height -300){
  	 	opa = opa -0.002;
  	  x.style.opacity = opa;
  	}

    if (pos > screen.height){
      x.remove();
      clearTimeout(id);
    }
  }
}
