Cookie policy message
Show a cookie policy message/banner on your site
Installation
npm install --save tmw-cookiepolicy
Import/require
// ES2015/ES6; // ES5var CookiePolicy = ;
UMD build
If you need a UMD/ES5 version, it has been provided. Use the CDN version at https://unpkg.com/tmw-cookiepolicy@2.0.0/umd/cookie-policy-umd.js or require it with an explicit path:
var CookiePolicy = ;
Options
var policyElement = document; policyElement // options, defaults listed policyName: 'policy-agreed' // cookie name to check policySeen: 'policy-seen' // cookie name to check expire: 30 // in days;
Template
Use the template at https://github.com/tmwagency/cookie-policy/blob/master/template.html
Styling
Some basic styles for the banner can be found at https://github.com/tmwagency/cookie-policy/blob/master/cookiePolicy.css