···11PUBLIC_LABELER_DID="did:plc:example"
22PUBLIC_LABELER_URL="https://..."
33PUBLIC_PDS_URL="https://..."
44-PUBLIC_AUTHENTICATION="oauth" # either "oauth" or "password"44+PUBLIC_AUTHENTICATION="oauth" # either "oauth" or "password"
55+PUBLIC_ENABLE_ADS_DEFAULT=true
-1
src/components/Advertisement.svelte
···11<script lang="ts">
22 import { XIcon } from 'lucide-svelte';
33- import { onMount } from 'svelte';
43 import { ads } from '$lib/ads';
5465 const { className } = $props<{
+6-1
src/lib/ads.ts
···11import { writable } from 'svelte/store';
22+import { getAdsDefault } from './api/ozone';
2334function createAdsStore() {
45 const { subscribe, set } = writable<boolean>(false);
5667 function update() {
77- set(!localStorage.getItem('adDismissed'));
88+ const dismissed = localStorage.getItem('adDismissed') === 'true';
99+ if (!dismissed && !getAdsDefault()) {
1010+ return set(false);
1111+ }
1212+ set(!dismissed);
813 }
9141015 function toggle(enabled: boolean) {
+5
src/lib/api/ozone.ts
···3535 throw new Error('Invalid authentication method. Set PUBLIC_AUTHENTICATION to either "oauth" or "password".')
3636 }
3737 return authMethod
3838+}
3939+4040+export function getAdsDefault() {
4141+ const adsDefault = env.PUBLIC_ENABLE_ADS_DEFAULT as string | boolean | undefined
4242+ return adsDefault === 'true' || adsDefault === true
3843}