Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schalkt/cookie-warn
Simple EU Cookie Law warning
https://github.com/schalkt/cookie-warn
cookie europe gdpr javascript law warning
Last synced: 16 days ago
JSON representation
Simple EU Cookie Law warning
- Host: GitHub
- URL: https://github.com/schalkt/cookie-warn
- Owner: schalkt
- License: mit
- Created: 2016-04-04T20:42:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T20:58:15.000Z (about 2 months ago)
- Last Synced: 2024-11-24T19:05:36.603Z (28 days ago)
- Topics: cookie, europe, gdpr, javascript, law, warning
- Language: JavaScript
- Homepage: https://projects.schalk.hu/cookie-warn/demo/index.html
- Size: 3.51 MB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cookie Warn
EU Cookie Law warning message
[![npm](https://img.shields.io/npm/dt/cookie-warn.svg?style=flat-square)](https://www.npmjs.com/package/cookie-warn)
[![GitHub issues](https://img.shields.io/github/issues/schalkt/cookie-warn.svg?style=flat-square)](https://github.com/schalkt/cookie-warn/issues)
[![npm](https://img.shields.io/npm/v/cookie-warn.svg?style=flat-square)](https://www.npmjs.com/package/cookie-warn)[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn&metric=security_rating)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=schalkt_cookie-warn&metric=bugs)](https://sonarcloud.io/dashboard?id=schalkt_cookie-warn)## Preview
[![preview](https://img.shields.io/badge/preview-click_here-green.svg?style=flat-square)](https://projects.schalk.hu/cookie-warn/demo/)
## Features
- jQuery not required
- multilanguage support
- customizable style
- responsive
- Bootstrap detect
- adjustable delay and expire days
- callback## Examples
### Example 1
- without parameters
```html
```
### Example 2
- all parameters
- texts and links by html lang attribute```html
const cookieWarnCallback = function(accepted) {
if (accepted) {
// do something...
} else {
// do nothing...
}
};```
### Example 3
- with default parameters
- texts and links by html lang attribute```html
```
## Todo
- accept cookies by types (necessary, all, custom)