https://github.com/b13/js-cookiebanner
https://github.com/b13/js-cookiebanner
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/b13/js-cookiebanner
- Owner: b13
- Created: 2017-07-26T12:35:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T12:36:39.000Z (almost 9 years ago)
- Last Synced: 2025-08-28T22:58:14.712Z (10 months ago)
- Language: JavaScript
- Size: 37.1 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
js-cookieBanner
===================
Lightweight javascript cookie banner plugin
### Default use
window.cookieBanner(options);
### Use as AMD module
require(['js-cookieBanner'], function(cookieBanner) {
new cookieBanner(options);
});
### Default options
options = {
// html cookie banner container
htmlContainer: '
'
// html cookie banner content
// will append to #bJS_cookieBannerContent
, htmlContent: '
We use cookies on this site to enhance your user experience
' +
'more infosaccept'
// cookie name
, cookieName: "cookieBanner"
// cookie timeout: 13 months in milliseconds
, cookieTimeout: 33696000000
// banner position
// can be "bottom" || "top"
, position: "bottom"
// deploy to show cookie banner
, delay: 600
// selectors
, selectors: {
cookieBanner : '#bJS_cookieBanner'
, acceptCookieBanner : '.bJS_acceptCookieBanner'
}
// class names
, classNames: {
positionTop : "b_cookieBannerPosition-top"
, positionBottom : "b_cookieBannerPosition-bottom"
}
// states
, states: {
active : "b_cookieBannerActive"
}
}