Small refactor of URLParams stuff

Splits out the room locartion parsing from everything else to avoid
one function that fills out different parts of its return struct
depending on its args.
This commit is contained in:
David Baker
2023-09-18 17:49:10 +01:00
parent d1e5a3043f
commit 4f48751aa2
5 changed files with 156 additions and 114 deletions

View File

@@ -61,7 +61,7 @@ export class Initializer {
languageDetector.addDetector({
name: "urlFragment",
// Look for a language code in the URL's fragment
lookup: () => getUrlParams(true).lang ?? undefined,
lookup: () => getUrlParams().lang ?? undefined,
});
i18n
@@ -94,7 +94,7 @@ export class Initializer {
}
// Custom fonts
const { fonts, fontScale } = getUrlParams(true);
const { fonts, fontScale } = getUrlParams();
if (fontScale !== null) {
document.documentElement.style.setProperty(
"--font-scale",