new cookie handler has proper support for setting expiry/path/domain/secure parameters + key/value encoding. The old one was not setting the cookie path, so even if you first came to http://goodcode.io/open-source/ and closed/agreed, you were again prompted when you went to the homepage (or any other page with a different path)
new contentLoaded() helps testability and is more generic (works even when the script is injected after everything is already loaded / ready)
optional covering of the viewport with a mask
(clicking on which is treated the same as the 'close/x' button) along with configurable opacity/background
configurable z-index for the notice (incremented automatically by 1 if a cover is used so that it appears above the cover)
fixed 'close/x' placement in markup so it looks better on small screens (since it's right-floated, it's better if it comes first in the markup)
Yay, thanks. I decided against vendoring contentLoaded and Cookie in since my versions worked just fine for me (and were fun to write), but it makes sense to actually the existing parts when possible.
contentLoaded()
helps testability and is more generic (works even when the script is injected after everything is already loaded / ready)Yay, thanks. I decided against vendoring contentLoaded and Cookie in since my versions worked just fine for me (and were fun to write), but it makes sense to actually the existing parts when possible.
\o/