Refactored project structure

This commit is contained in:
squidfunk
2021-11-14 16:09:09 +01:00
parent ad1b964aaa
commit 88ba609ee1
52 changed files with 721 additions and 459 deletions

View File

@@ -20,7 +20,7 @@
* IN THE SOFTWARE.
*/
import { getElementOrThrow, getLocation } from "~/browser"
import { getElement, getLocation } from "~/browser"
/* ----------------------------------------------------------------------------
* Types
@@ -99,7 +99,7 @@ export interface Config {
/**
* Retrieve global configuration and make base URL absolute
*/
const script = getElementOrThrow("#__config")
const script = getElement("#__config")
const config: Config = JSON.parse(script.textContent!)
config.base = `${new URL(config.base, getLocation())}`