cookie-consent-js
Advanced tools
Comparing version
{ | ||
"name": "cookie-consent-js", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "A simple dialog and framework to handle the German and EU law (may 2020) about cookies in a website", | ||
@@ -5,0 +5,0 @@ "main": "src/cookie-consent.js", |
@@ -23,5 +23,7 @@ # cookie-consent-js | ||
## JavaScript API | ||
## API | ||
### Show the settings dialog again | ||
### JavaScript API | ||
#### Show the settings dialog again | ||
```js | ||
@@ -33,3 +35,3 @@ cookieConsent.reset() | ||
### Read the status | ||
#### Read the status | ||
```js | ||
@@ -46,4 +48,12 @@ cookieConsent.isTrackingCookieAllowed() | ||
### Read the status from PHP | ||
### Configuration properties | ||
Read the cookie from a PHP server with | ||
```php | ||
if($_COOKIE['cookie-consent-accept-all'] === 'true') { | ||
// do some tracking | ||
} | ||
``` | ||
## Configuration properties | ||
With default values. | ||
@@ -56,3 +66,3 @@ | ||
privacyPolicyUrl: "privacy-policy.html", | ||
autoShowModal: true, // disable autoShowModal on the privacy policy page, to make this page readable | ||
autoShowModal: true, // disable autoShowModal on the privacy policy page, to make that page readable | ||
lang: navigator.language, // the language, in which the modal is shown | ||
@@ -84,3 +94,3 @@ content: { // the content in all needed languages | ||
#### Disable autoShow | ||
### Disable autoShow | ||
You should disable `autoShowModal` in the privacy policy page to make that page readable. | ||
@@ -87,0 +97,0 @@ ```js |
@@ -14,3 +14,3 @@ /** | ||
privacyPolicyUrl: "privacy-policy.html", | ||
autoShowModal: true, // disable autoShowModal on the privacy policy page, to make this page readable | ||
autoShowModal: true, // disable autoShowModal on the privacy policy page, to make that page readable | ||
lang: navigator.language, // the language, in which the modal is shown | ||
@@ -17,0 +17,0 @@ content: { // the content in all needed languages |
18557
0.93%99
11.24%