Minor fixes.
This commit is contained in:
parent
37366fcf69
commit
993b93bc30
2 changed files with 5 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -8,6 +8,8 @@ node_modules
|
|||
/.svelte-kit
|
||||
/build
|
||||
|
||||
*.tar.gz
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue