Skip to content

Commit

Permalink
Merge pull request #5 from davidtaylorjr/variables
Browse files Browse the repository at this point in the history
Add Temp Feels Like Condtional
  • Loading branch information
davidtaylorjr committed Jan 12, 2017
2 parents 3be5ada + 404fa54 commit f51e156
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch index.html",
"type": "firefox",
"request": "launch",
"file": "${workspaceRoot}/index.html"
},
{
"name": "Launch localhost",
"type": "firefox",
"request": "launch",
"url": "http://localhost/index.html",
"webRoot": "${workspaceRoot}"
},
{
"name": "Attach",
"type": "firefox",
"request": "attach"
},
{
"name": "Launch addon",
"type": "firefox",
"request": "launch",
"addonType": "addonSdk",
"addonPath": "${workspaceRoot}"
}
]
}
10 changes: 8 additions & 2 deletions scripts/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,18 @@ function geoLocation() {
window.tempFeel = tempFeel;
window.tempFeelCelsius = tempFeelCelsius;


console.log(data);

var current = document.getElementById(conditions);
var dataPoints = document.getElementById(variables);

conditions.innerHTML = "<p>It is currently " + Math.round(temp) + " °F" + " and " + description;

if (temp != tempFeel) {
variables.innerHTML = "<p> It feels like it is " + Math.round(tempFeel) + " °F.";

}



var hourly = document.getElementById(twentyfour);
Expand Down Expand Up @@ -104,7 +110,7 @@ function geoLocation() {
output.innerHTML = "Unable to retrieve your location";
}

userAddress.innerHTML = "<p>Locating…</p>";
userAddress.innerHTML = "<p>Grabbing Your Location...</p>";

navigator.geolocation.getCurrentPosition(success, error);

Expand Down

0 comments on commit f51e156

Please sign in to comment.