mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 01:18:27 +00:00
web/layout: load the plausible script only once
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
oops
This commit is contained in:
parent
3295032882
commit
a8bffc4b27
@ -36,6 +36,7 @@
|
||||
device.prefers.reducedTransparency;
|
||||
|
||||
$: preloadMeowbalt = false;
|
||||
$: plausibleLoaded = false;
|
||||
|
||||
afterNavigate(async () => {
|
||||
const to_focus: HTMLElement | null =
|
||||
@ -67,10 +68,13 @@
|
||||
<meta name="theme-color" content={statusBarColors[$currentTheme]} />
|
||||
{/if}
|
||||
|
||||
{#if browser && env.PLAUSIBLE_ENABLED && !$settings.privacy.disableAnalytics}
|
||||
{#if plausibleLoaded || (browser && env.PLAUSIBLE_ENABLED && !$settings.privacy.disableAnalytics)}
|
||||
<script
|
||||
defer
|
||||
data-domain={env.HOST}
|
||||
on:load={() => {
|
||||
plausibleLoaded = true;
|
||||
}}
|
||||
src="https://{env.PLAUSIBLE_HOST}/js/script.js"
|
||||
>
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user