Add support for mapcomplete.osm.be/themename and not only mapcomplete.osm.be/themename.html
This commit is contained in:
parent
76b83acf01
commit
201e485238
1 changed files with 4 additions and 1 deletions
3
index.ts
3
index.ts
|
@ -55,7 +55,10 @@ if (location.hostname === "localhost" || location.hostname === "127.0.0.1") {
|
|||
|
||||
const path = window.location.pathname.split("/").slice(-1)[0];
|
||||
if (path !== "index.html" && path !== "") {
|
||||
defaultLayout = path;
|
||||
if(path.endsWith(".html")){
|
||||
defaultLayout = path.substr(0, path.length - 5);
|
||||
}
|
||||
console.log("Using layout", defaultLayout);
|
||||
}
|
||||
defaultLayout = QueryParameters.GetQueryParameter("layout", defaultLayout,"The layout to load into MapComplete").data;
|
||||
|
|
Loading…
Reference in a new issue