Oli Gentle Consent

No? OK, cool.

The consent the law asks for, asked gently: one small question, and “no” is a normal answer. The visitor who says no keeps a page that works, with plain links, and is never asked again.

A plugin for Grav. Coming soon on GitHub (AGPL-3.0).

What the visitor sees

Until they agree, a video, a map or a player is a card with a plain link, and nothing is sent to the provider. Once they agree, the cards become the real content, at once.

What it does

In a page

<div class="embed-slot" data-embed-src="https://www.youtube-nocookie.com/embed/ID">
  <a class="embed-card" href="https://www.youtube.com/watch?v=ID">Watch on YouTube</a>
</div>

In the privacy policy: [consent-sources /] (the list of the services) and [consent-switch /] (the visitor’s choice).

Consent.granted('embeds')            // true once the visitor agreed
Consent.whenGranted('embeds', fn)    // fn now if agreed, else as soon as they agree
document.addEventListener('consent:change', (e) => e.detail)

Practising what it preaches

This page sets no cookie, runs no script and loads nothing from another server. You can see the plugin at work on van-helden.net.