aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/+layout.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/+layout.svelte')
-rw-r--r--src/routes/+layout.svelte20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
new file mode 100644
index 0000000..b0e82a6
--- /dev/null
+++ b/src/routes/+layout.svelte
@@ -0,0 +1,20 @@
+<script lang="ts">
+ import { onDestroy, onMount } from 'svelte';
+ import '../app.css';
+ let { children } = $props();
+
+ let mounted = $state(false);
+ onMount(async () => {
+ (globalThis as any).browser = (
+ await import('webextension-polyfill')
+ ).default;
+ mounted = true;
+ });
+ onDestroy(() => (mounted = false));
+</script>
+
+{#if mounted}
+ {@render children()}
+{:else}
+ <p>Waiting on Mount</p>
+{/if}