cookie-consent-js
Advanced tools
Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "cookie-consent-js", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "A simple dialog and framework to handle the EU law (as written by EuGH, 1.10.2019 – C-673/17) about cookies in a website.", | ||
@@ -5,0 +5,0 @@ "main": "src/cookie-consent.js", |
@@ -6,6 +6,7 @@ # cookie-consent-js | ||
There are language files for en, de, fr, es, oc and tr. If you add one, please make a pull request to have it added here as well, | ||
thanks. | ||
There are language files for en, de, fr, es, oc and tr. If you add one, please make a pull request to have it added here | ||
as well, thanks. | ||
The banner and framework was designed in cooperation with data protection officers and lawyers. However, we can not guarantee whether the banner is correct for your website and assume no liability for its use. | ||
The banner and framework was designed in cooperation with data protection officers and lawyers. However, we can not | ||
guarantee whether the banner is correct for your website and assume no liability for its use. | ||
@@ -49,3 +50,3 @@ ## Features | ||
In your `<head>` or at the bottom of your `<body>`. | ||
In your websites `<head>` or at the bottom of the `<body>`. | ||
@@ -56,4 +57,4 @@ ### 4. Initialize the Script | ||
const cookieConsent = new CookieConsent({ | ||
contentUrl: "./cookie-consent-content", // location of the language files | ||
privacyPolicyUrl: "/privacy-policy.html" | ||
contentUrl: "./cookie-consent-content", // location of the language files | ||
privacyPolicyUrl: "/privacy-policy.html" | ||
}) | ||
@@ -142,15 +143,15 @@ ``` | ||
self.props = { | ||
buttonPrimaryClass: "btn btn-primary", // the "accept all" buttons class, only used for styling | ||
buttonSecondaryClass: "btn btn-secondary", // the "accept necessary" buttons class, only used for styling | ||
autoShowModal: true, // disable autoShowModal on the privacy policy page, to make that page readable | ||
blockAccess: false, // set "true" to block the access to the website before choosing a cookie configuration | ||
position: "right", // position ("left" or "right"), if blockAccess is false | ||
postSelectionCallback: undefined, // callback, after the user has made a selection | ||
lang: navigator.language, // the language, in which the dialog is shown | ||
defaultLang: "en", // default language, if the `lang` is not available as translation in `cookie-consent-content` | ||
content: [], // deprecated, we now have a `content` folder, which contains the language files | ||
contentUrl: "./cookie-consent-content", // the url of the "cookie-consent-content" folder, which contains the language files | ||
privacyPolicyUrl: "privacy-policy.html", | ||
cookieName: "cookie-consent-tracking-allowed", // the name of the cookie, the cookie is `true` if tracking was accepted | ||
modalId: "cookieConsentModal" // the id of the modal dialog element | ||
buttonPrimaryClass: "btn btn-primary", // the "accept all" buttons class, only used for styling | ||
buttonSecondaryClass: "btn btn-secondary", // the "accept necessary" buttons class, only used for styling | ||
autoShowModal: true, // disable autoShowModal on the privacy policy page, to make that page readable | ||
blockAccess: false, // set "true" to block the access to the website before choosing a cookie configuration | ||
position: "right", // position ("left" or "right"), if blockAccess is false | ||
postSelectionCallback: undefined, // callback, after the user has made a selection | ||
lang: navigator.language, // the language, in which the dialog is shown | ||
defaultLang: "en", // default language, if the `lang` is not available as translation in `cookie-consent-content` | ||
content: [], // deprecated, we now have a `content` folder, which contains the language files | ||
contentUrl: "./cookie-consent-content", // the url of the "cookie-consent-content" folder, which contains the language files | ||
privacyPolicyUrl: "privacy-policy.html", | ||
cookieName: "cookie-consent-tracking-allowed", // the name of the cookie, the cookie is `true` if tracking was accepted | ||
modalId: "cookieConsentModal" // the id of the modal dialog element | ||
} | ||
@@ -165,3 +166,7 @@ ``` | ||
```js | ||
var cookieConsent = new CookieConsent({autoShowModal: false, privacyPolicyUrl: "privacy-policy.html", contentUrl: "./cookie-consent-content"}) | ||
var cookieConsent = new CookieConsent({ | ||
autoShowModal: false, | ||
privacyPolicyUrl: "privacy-policy.html", | ||
contentUrl: "./cookie-consent-content" | ||
}) | ||
``` | ||
@@ -168,0 +173,0 @@ |
58364
181