diff --git a/src/App.vue b/src/App.vue index 84e6c5e..b1fa256 100644 --- a/src/App.vue +++ b/src/App.vue @@ -87,6 +87,18 @@ export default defineComponent({ const parsedUrl = Util.parseUrl(); if(parsedUrl) { + //Remove legacy url if one was parsed + if(parsedUrl.legacy) { + const url = new URL(window.location.href); + url.searchParams.delete('worldname'); + url.searchParams.delete('mapname'); + url.searchParams.delete('x'); + url.searchParams.delete('y'); + url.searchParams.delete('z'); + url.searchParams.delete('zoom'); + history.replaceState({}, '', url.toString()); + } + store.commit(MutationTypes.SET_PARSED_URL, parsedUrl); } }; diff --git a/src/store/state.ts b/src/store/state.ts index c12ec80..5173ee6 100644 --- a/src/store/state.ts +++ b/src/store/state.ts @@ -150,5 +150,6 @@ export const state: State = { map: undefined, location: undefined, zoom: undefined, + legacy: false, } };