cookie-consent-js
Version:
A simple dialog and framework to handle the EU law (as written by EuGH, 1.10.2019 – C-673/17) about cookies in a website.
25 lines (23 loc) • 1.13 kB
HTML
<html lang="en">
<head>
<title>cookie-consent-js testpage</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="examples.css">
<link rel="stylesheet" href="../src/cookie-consent.css"/>
</head>
<body>
<h1><a href="../index.html">cookie-consent-js</a> - banner blocking access</h1>
<p>With the `<code>blockAccess: true</code>` configurations, <b>the user is blocked from using the website</b> before accepting the cookie
configuration.</p>
<h2>API</h2>
<button onclick="cookieConsent.reset()">Show the cookie settings dialog</button>
<button onclick="console.log('trackingAllowed:', cookieConsent.trackingAllowed())">Log the status to the developer console</button>
<script src="../src/cookie-consent.js"></script>
<script>
var cookieConsent = new CookieConsent({contentUrl: "../cookie-consent-content", blockAccess: true, privacyPolicyUrl: "privacy-policy-mockup.html", cookieName: "cc-block-tracking"})
</script>
</body>
</html>