@burdapraha/frontend
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -11,2 +11,25 @@ /** | ||
return dt.toUTCString(); | ||
} | ||
} | ||
/** | ||
* Credit: https://stackoverflow.com/a/25971410 | ||
* @type {{getLocation: Function}} | ||
*/ | ||
var geoLocation = { | ||
getLocation: function() { | ||
var deferred = $.Deferred(); | ||
if(navigator.geolocation) { | ||
// geo location is supported. Call navigator.geolocation.getCurrentPosition and : | ||
// - resolve the promise with the returned Position object, or | ||
// - reject the promise with the returned PositionError object, or | ||
// - time out after 5 seconds | ||
navigator.geolocation.getCurrentPosition(deferred.resolve, deferred.reject, { timeout: 5000 }); | ||
} else { | ||
//geo location isn't supported | ||
//Reject the promise with a suitable error message | ||
deferred.reject(new Error('Your browser does not support Geo Location.')); | ||
} | ||
return deferred.promise(); | ||
} | ||
}; |
{ | ||
"name": "@burdapraha/frontend", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "BurdaPraha UI kit", | ||
@@ -17,4 +17,3 @@ "main": "assets/javascripts/main.js", | ||
"scripts": { | ||
"test": "gulp", | ||
"publish": "npm publish --access=public" | ||
"test": "gulp" | ||
}, | ||
@@ -21,0 +20,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
8737
55