mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-28 13:36:31 +01:00
Allow only providing the map-id in the page-adress, fixes: #589
This commit is contained in:
parent
48fa5b6abc
commit
074bbc3d0f
@ -710,6 +710,18 @@ export class BlueMapApp {
|
|||||||
let hash = window.location.hash?.substring(1) || this.settings.startLocation || "";
|
let hash = window.location.hash?.substring(1) || this.settings.startLocation || "";
|
||||||
let values = hash.split(":");
|
let values = hash.split(":");
|
||||||
|
|
||||||
|
// only world is provided
|
||||||
|
if (values.length === 1 && (!this.mapViewer.map || this.mapViewer.map.data.id !== values[0])) {
|
||||||
|
try {
|
||||||
|
await this.switchMap(values[0]);
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// load full location
|
||||||
if (values.length !== 10) return false;
|
if (values.length !== 10) return false;
|
||||||
|
|
||||||
let controls = this.mapViewer.controlsManager;
|
let controls = this.mapViewer.controlsManager;
|
||||||
|
Loading…
Reference in New Issue
Block a user