|
@@ -151,8 +151,7 @@
|
|
|
console.debug("Latitude: " + position.coords.latitude + " Longitude: " + position.coords.longitude, position);
|
|
|
|
|
|
const label = _converse.xmppstatus.get('fullname') || _converse.xmppstatus.get('nickname') || _converse.bare_jid;
|
|
|
- const pos = location.href.lastIndexOf('/') + 1;
|
|
|
- const url = location.href.substring(0, pos) + "packages/location/leaflet/index.html?accuracy=" + position.coords.accuracy + "&lat=" + position.coords.latitude + "&lng=" + position.coords.longitude + "&label=" + label;
|
|
|
+ const url = _converse.api.settings.get("assets_path") + "packages/location/leaflet/index.html?accuracy=" + position.coords.accuracy + "&lat=" + position.coords.latitude + "&lng=" + position.coords.longitude + "&label=" + label;
|
|
|
|
|
|
callback(url, position);
|
|
|
}
|
|
@@ -195,7 +194,6 @@
|
|
|
|
|
|
const label = message.getAttribute("from");
|
|
|
const position = {coords: {accuracy: accuracy, latitude: lat, longitude: lon}};
|
|
|
- const pos = location.href.lastIndexOf('/') + 1;
|
|
|
const url = _converse.api.settings.get("assets_path") + "../packages/location/leaflet/index.html?accuracy=" + position.coords.accuracy + "&lat=" + position.coords.latitude + "&lon=" + position.coords.longitude + "&label=" + label;
|
|
|
|
|
|
var prompt = new Notification(label,
|