Minor fixes.

This commit is contained in:
Alfred Jophy 2026-02-05 17:28:58 +05:30
commit 993b93bc30
2 changed files with 5 additions and 11 deletions

2
.gitignore vendored
View file

@ -8,6 +8,8 @@ node_modules
/.svelte-kit
/build
*.tar.gz
# OS
.DS_Store
Thumbs.db

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { browser, dev } from '$app/environment';
import { onDestroy, onMount } from 'svelte';
import { onMount } from 'svelte';
const UMAMI_DISABLED_KEY = 'umami.disabled';
@ -11,7 +11,7 @@
websiteId: string;
tags?: string | string[];
async?: boolean;
enable?: boolean;
// enable?: boolean;
hostUrl?: string;
autoTrack?: boolean;
domains?: string | string[];
@ -76,20 +76,12 @@
onMount(() => {
if (browser) {
if (dev && !rest.enable) {
if (dev) {
//@ts-expect-error AS PER DOC
localStorage.setItem(UMAMI_DISABLED_KEY, 1);
}
}
});
onDestroy(() => {
if (browser) {
if (dev && !rest.enable) {
localStorage.removeItem(UMAMI_DISABLED_KEY);
}
}
});
</script>
<svelte:head>