Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vielhuber/ilovecookies
Shows a cookie bar without any dependencies.
https://github.com/vielhuber/ilovecookies
Last synced: 19 days ago
JSON representation
Shows a cookie bar without any dependencies.
- Host: GitHub
- URL: https://github.com/vielhuber/ilovecookies
- Owner: vielhuber
- Created: 2016-06-19T20:15:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-11T20:56:02.000Z (over 5 years ago)
- Last Synced: 2024-11-17T08:07:16.662Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## installation
use it as a module:
```
npm install ilovecookies
```
```js
import iLoveCookies from 'ilovecookies';
```or embed it directly:
```html
```## usage
```js
document.addEventListener('DOMContentLoaded', () =>
{
let ilovecookies = new iLoveCookies({
expiration: 30,
css: true,
padding_bottom: true, // increase padding bottom with height of cookiebar to prevent overlapping important links
de: {
text: 'Um die Webseite optimal gestalten und fortlaufend verbessern zu können, verwenden wir Cookies. Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu.',
close_text: 'Schließen',
more_text: 'Weitere Informationen',
more_link: 'datenschutz'
},
en: {
text: 'To ensure that our web site is well managed and to facilitate improved navigation within the site, we may use cookies. By using this website, you agree to the use of cookies.',
close_text: 'Close',
more_text: 'Further information',
more_link: function() { alert('foo'); }
}
});
});
```