Skip to content

Instantly share code, notes, and snippets.

View meduzen's full-sized avatar
🌍
<body> in Belgium, <head> worldwide.

Mehdi meduzen

🌍
<body> in Belgium, <head> worldwide.
View GitHub Profile
@meduzen
meduzen / list.md
Last active January 27, 2025 10:14
Alternatives to Google Analytics
const SW_VERSION = '1.2.3' // update it when the app changes: invalidates `resourcesToCache`
const resourcesCacheKey = `cache-v${SW_VERSION}`
const microfrontendCacheKey = `mfe` // not sure versioning is needed
const resourcesToCache = [
'/',
'site.webmanifest',
'css/app.css',
@meduzen
meduzen / base-dialog.css
Created February 26, 2025 20:35
`<dialog>` component using Svelte 3 and plain CSS
:where(dialog) {
position: fixed;
margin: auto;
size: fit-content;
overscroll-behavior-y: contain;
}
:where(dialog:not([open])) {