Added Weather and greetings examples
This commit is contained in:
parent
6e90644faf
commit
8b70add01d
@ -2,7 +2,7 @@ var today = new Date();
|
|||||||
var Hr = today.getHours();
|
var Hr = today.getHours();
|
||||||
|
|
||||||
// Here you can change the greetings and your name
|
// Here you can change the greetings and your name
|
||||||
var name = '[Name]';
|
var name = 'John Doe';
|
||||||
var lateTxt = 'Go to Sleep! ';
|
var lateTxt = 'Go to Sleep! ';
|
||||||
var morningTxt = 'Good morning! ';
|
var morningTxt = 'Good morning! ';
|
||||||
var afterTxt = 'Good afternoon ';
|
var afterTxt = 'Good afternoon ';
|
||||||
|
@ -9,6 +9,7 @@ weather.temperature = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const KELVIN = 273;
|
const KELVIN = 273;
|
||||||
|
// You can use your own key for the Weather
|
||||||
const key = 'aa5b0a76dfbf87441928fb3cc32d3d69';
|
const key = 'aa5b0a76dfbf87441928fb3cc32d3d69';
|
||||||
|
|
||||||
// Set Position function
|
// Set Position function
|
||||||
@ -16,8 +17,9 @@ setPosition();
|
|||||||
|
|
||||||
function setPosition(position) {
|
function setPosition(position) {
|
||||||
// Here you can change your position
|
// Here you can change your position
|
||||||
let latitude = 21.0265;
|
// You can use https://www.latlong.net/ to get it! (I use San Francisco as an example)
|
||||||
let longitude = -89.6765;
|
let latitude = 37.774929;
|
||||||
|
let longitude = -122.419418;
|
||||||
|
|
||||||
getWeather(latitude, longitude);
|
getWeather(latitude, longitude);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user