Cookie policy
Here's your one stop shop for cookie policy compliance.
It is a reimplementation of this one as a self contained web component.
Usage
To use it, simply add it to your markup like so:
Cookie policy
<cookie-policy></cookie-policy>
Revoking the cookie policy
To revoke the cookie policy, dispatch a revokeCookies
event:
Revoking cookies
<v-button id="revoke-button" appearance="negative">Revoke cookies</v-button>
<script>
const revokeCookies = new Event("revokeCookies");
function revoke() {
document.dispatchEvent(revokeCookies);
}
document.getElementById("revoke-button").addEventListener("click", revoke);
</script>
Visiting a page with tracker disabled
If you add the query ?cp=hide
to any URL the cookie policy will not be rendered. The main use case is to visit the policy page without the modal blocking the content.
Adaptative language
The cookie policy modal will adapt based on the lang
attribute of the <html>
tag
Currently supported languages are English, Chinese and Japanese.