forked from MapComplete/MapComplete
Fix: safari-specific fixes
This commit is contained in:
parent
89c6321e40
commit
059ef2c1bc
2 changed files with 7 additions and 0 deletions
|
@ -316,6 +316,7 @@ async function generateCsp(
|
||||||
"script-src": ["'self'", "https://gc.zgo.at/count.js", ...(options?.scriptSrcs ?? [])].join(
|
"script-src": ["'self'", "https://gc.zgo.at/count.js", ...(options?.scriptSrcs ?? [])].join(
|
||||||
" ",
|
" ",
|
||||||
),
|
),
|
||||||
|
"child-src": "self",
|
||||||
"img-src": "* data:", // maplibre depends on 'data:' to load
|
"img-src": "* data:", // maplibre depends on 'data:' to load
|
||||||
"connect-src": connectSrc.join(" "),
|
"connect-src": connectSrc.join(" "),
|
||||||
"report-to": "https://report.mapcomplete.org/csp",
|
"report-to": "https://report.mapcomplete.org/csp",
|
||||||
|
|
|
@ -119,6 +119,12 @@ export class GeoLocationState {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(navigator.permissions === undefined && navigator.geolocation !== undefined){
|
||||||
|
// This is probably safari - we just start watching right away
|
||||||
|
this.startWatching()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.permission.setData("requested")
|
this.permission.setData("requested")
|
||||||
try {
|
try {
|
||||||
const status = await navigator?.permissions?.query({ name: "geolocation" })
|
const status = await navigator?.permissions?.query({ name: "geolocation" })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue