UNPKG

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.

27 lines (26 loc) 938 B
<!doctype 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="../src/cookie-consent.css"/> <link rel="stylesheet" href="examples.css"> </head> <body> <h1><a href="../index.html">cookie-consent-js</a> - Example in plain HTML</h1> <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> const cookieConsent = new CookieConsent({ contentUrl: "../cookie-consent-content", privacyPolicyUrl: "privacy-policy-mockup.html" }) </script> </body> </html>