{"size": 1426, "ext": "js", "max_stars_repo_path": "weather.min.js", "max_stars_repo_name": "amonks/weather", "max_stars_repo_stars_event_min_datetime": "2016-12-23T15:05:15.000Z", "max_stars_repo_stars_event_max_datetime": "2016-12-23T15:05:15.000Z", "max_issues_repo_path": "weather.min.js", "max_issues_repo_name": "amonks/weather", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "weather.min.js", "max_forks_repo_name": "amonks/weather", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 1426.0, "max_line_length": 1426, "alphanum_fraction": 0.786115007}
var x=$("#console");Weather={grid:40,forecastIOKey:"0ea12a6cd58c887c14ebd67679e11701",get:function(){Weather.getLocation()},getForecast:function(e){return url="https://api.forecast.io/forecast/"+Weather.forecastIOKey+"/"+e.latitude+","+e.longitude,console.log("fetching weather from "+url),out=Bouncer.get(url)},getLocation:function(){navigator.geolocation?navigator.geolocation.getCurrentPosition(Weather.doWeather,Weather.showError):x.innerHTML="Geolocation is not supported by this browser."},doWeather:function(e){return out=Weather.getForecast(e.coords).response,weather=JSON.parse(out),Weather.makeClouds(weather.currently.cloudCover),weather.currently.cloudCover},showError:function(e){switch(e.code){case e.PERMISSION_DENIED:x.innerHTML="User denied the request for Geolocation.";break;case e.POSITION_UNAVAILABLE:x.innerHTML="Location information is unavailable.";break;case e.TIMEOUT:x.innerHTML="The request to get user location timed out.";break;case e.UNKNOWN_ERROR:x.innerHTML="An unknown error occurred."}},makeClouds:function(e){$("#loading").remove();var o=document.getElementById("canvas");o.width=document.body.clientWidth,o.height=document.body.clientHeight,canvasX=o.width,canvasY=o.height;var t=o.getContext("2d"),r=new Image;r.onload=function(){for(var o=canvasX-1;o>=0;o--)if(o%Weather.grid===0)for(var a=canvasY-1;a>=0;a--)a%Weather.grid===0&&Math.random()<=e&&t.drawImage(r,o,a)},r.src="cloud.png"}};