cookie-consent-js
Advanced tools
Comparing version 1.6.1 to 1.6.3
{ | ||
"name": "cookie-consent-js", | ||
"version": "1.6.1", | ||
"version": "1.6.3", | ||
"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", |
@@ -16,6 +16,7 @@ /** | ||
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 | ||
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 his 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 `content` | ||
content: { // the content in all needed languages | ||
@@ -45,4 +46,10 @@ de: { | ||
for (let property in props) { | ||
if(property !== "content") { | ||
// noinspection JSUnfilteredForInLoop | ||
self.props[property] = props[property] | ||
} | ||
} | ||
for (let contentProperty in props.content) { | ||
// noinspection JSUnfilteredForInLoop | ||
self.props[property] = props[property] | ||
self.props.content[contentProperty] = props.content[contentProperty] | ||
} | ||
@@ -54,3 +61,3 @@ self.lang = self.props.lang | ||
if (self.props.content[self.lang] === undefined) { | ||
self.lang = "en" // fallback | ||
self.lang = self.props.defaultLang | ||
} | ||
@@ -57,0 +64,0 @@ const _t = self.props.content[self.lang] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
59338
18
324