Alex-D / Cookies-EU-banner

1kb vanilla JS script which manages cookies consent banner display like asked by GDPR
http://alex-d.github.io/Cookies-EU-banner/
MIT License
441 stars 57 forks source link

Allow to pass parameters to the constructor #3

Closed Situphen closed 9 years ago

Situphen commented 9 years ago

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);
Alex-D commented 9 years ago

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.