mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 04:21:24 +01:00
Update stylePresets.js
This commit is contained in:
parent
ab3c8c9e04
commit
31b253e0a2
1 changed files with 4 additions and 1 deletions
|
|
@ -14,7 +14,10 @@ const customPresetPrefix = "fmgStyle_";
|
||||||
}
|
}
|
||||||
|
|
||||||
async function applyStyleOnLoad() {
|
async function applyStyleOnLoad() {
|
||||||
const desiredPreset = localStorage.getItem("presetStyle") || "default";
|
const queryString = window.location.search;
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
|
||||||
|
const desiredPreset = urlParams.get("presetStyle") || localStorage.getItem("presetStyle") || "default";
|
||||||
const styleData = await getStylePreset(desiredPreset);
|
const styleData = await getStylePreset(desiredPreset);
|
||||||
const [appliedPreset, style] = styleData;
|
const [appliedPreset, style] = styleData;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue