Cookies Banner
Manage cookies banner, by hide it when click on a button for a specific number of days.
Installation
Download and install npm at www.npmjs.com/get-npm if you haven't already.
npm install cookies-banner
This package is provided in ES6 module format.
Usage
In your html, the cookies banner must have cookiesBanner
as id, and the button wich close the banner must have closeCookiesBanner
as id.
This website use cookies. Learn more I accept
In the js :
;CookiesBanner;
And it's all ! When the user will click on closeCookiesBanner
, the banner will be closed for 15 days by default. To change this duration (to 30 days for example), you can do :
;CookiesBannerdays = 30;CookiesBanner;