This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function requestLocation(){ | |
if (window.Geolocation){ | |
window.Geolocation.getCurrentPosition(function(position){ | |
createMap(position.coors.latitude, position.coors.longitude); | |
}) | |
} | |
else { | |
alert("Your current browser does not support the Geolocation feature."); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("load", function(){ | |
progressier.add({ | |
id: "pDy0w3lGo3j9gL2zwK" | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/manifest.json', function(req, res){ | |
try { | |
//this is our localized content | |
let localizedContent = { | |
name: { | |
en: "Example App", | |
fr: "Appli Example", | |
es: "Aplicación de ejemplo" | |
}, | |
description: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function currentBrowserSupportsPush(){ | |
if (!'PushManager' in window){return false;} | |
if (!'serviceWorker' in navigator){return false;} | |
if (!'Notification' in window){return false;} | |
return true; | |
} |