Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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'); }
}
});
});
```