Wruczek / Bootstrap-Cookie-Alert

A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.
https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs5.html
MIT License
240 stars 50 forks source link

Add deny button #20

Closed xenorio closed 2 years ago

xenorio commented 3 years ago

Should be backwards compatible.

Adds a button for denying cookies, which sets the acceptCookies cookie to false instead of true.

If acceptCookies is undefined, the alert will show as usual. If it's either true or false, it won't.

Also implements an event that fires when the deny button is clicked.

Partially fixes https://github.com/Wruczek/Bootstrap-Cookie-Alert/issues/19

trevismd commented 3 years ago

Hey, Nice and clean. However, is it appropriate to just set a cookie for 1 year after someone chose "decline"? I think most sites keep coming at you at nexts visits in theses cases. Or there should be multiple levels of (dis-)agreement...

xenorio commented 3 years ago

If you don't want the information to be saved, you can just not add the button. Of course setting a cookie that stores your choice not to use cookies is kind of counter intuitive, but that information needs to be saved somewhere if you don't want to keep bothering users with the popup. And it's not like there's any identifying information in there, just a boolean. So it counts as a purely functional cookie with no tracking capability or something similar, which in my mind is completely okay data-protection wise and should be covered by most (if not all) international laws regarding cookies (i am not a lawyer tho)

Anyway, this was just a modification i made for personal purposes and thought i might as well share in case someone else wants the same functionality.

xenorio commented 2 years ago

Well apparently this is dead, sooo...

trevismd commented 2 years ago

That's too bad.