mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-24 10:56:50 +01:00
declare geposition variable
This commit is contained in:
parent
ca32a2b5ac
commit
7ddd2a045a
@ -1,6 +1,6 @@
|
||||
var reportedPositionFailures = 0;
|
||||
navigator.geolocation.getCurrentPosition = function(success, failure, options) { //override because default implementation requires GPS permission
|
||||
geoposition = JSON.parse(GBjs.getCurrentPosition());
|
||||
var geoposition = JSON.parse(GBjs.getCurrentPosition());
|
||||
|
||||
if(options && options.maximumAge && (geoposition.timestamp < Date.now() - options.maximumAge) && reportedPositionFailures <= 10 ) {
|
||||
reportedPositionFailures++;
|
||||
|
Loading…
Reference in New Issue
Block a user