A privacy-first plugin that automatically adds consent overlays to all iframes on your website.
- Automatic Detection: Finds all iframes on your site automatically
- Zero Manual Work: Works with existing posts without changes
- Privacy-First: No external requests until user consent
- Multi-language: English and German with auto-detection
- LocalStorage Support: Remembers user preferences
- No Dependencies: Pure vanilla JavaScript and CSS
-
Install the plugin via Micro.blog's plugin interface
-
Add to your custom theme:
In layouts/partials/head.html:
{{ partial "embed-consent-config.html" . }}
<link rel="stylesheet" href="{{ "css/embed-consent.css" | relURL }}">In layouts/partials/footer.html:
<script src="{{ "js/embed-consent.js" | relURL }}"></script>That's it! No configuration needed. The plugin works with sensible defaults:
- ✅ LocalStorage enabled (remembers user preferences)
- ✅ "Always allow" checkbox shown
- ✅ Auto language detection (German/English based on browser settings)
The plugin automatically detects and displays logos for these services:
- YouTube (including youtube-nocookie.com)
- Vimeo
- ARTE
- Komoot
- Google Maps
- OpenStreetMap
All other iframes are supported but shown with a generic overlay.
To exclude certain iframes from consent:
<iframe src="..." class="no-consent"></iframe>