Alex-D / Cookies-EU-banner

1kb vanilla JS script which manages cookies consent banner display like asked by GDPR

Home Page:http://alex-d.github.io/Cookies-EU-banner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to pass parameters to the constructor

Situphen opened this issue · comments

Actually, the code is unyielding. We can't change the IDs of the buttons and the link, or change the duration of the cookie. I think it would be better if we can pass an object to the constructor like :

var parameters = {
    "too": bar,
};

var cookiesBanner = new CookiesCnilBanner(analyticFunction, parameters);

We can't change the IDs of the buttons and the link

It's a choice.

or change the duration of the cookie

Maximum is 13 months defined by CNIL, i put this to it maximum.