From c6ebfa0ea574292e206dac3953988908b6e56b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Tue, 9 Nov 2021 22:55:45 +0100 Subject: [PATCH] Docs: Unify codestyle in examples --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 18bfd346..c3373f60 100644 --- a/README.md +++ b/README.md @@ -133,8 +133,8 @@ To execute custom code which depends on cookie consent use callbacks: // ... initLmcCookieConsentManager( { - 'onAcceptAll': (cookie, cookieConsent) => { - if (cookieConsent.allowedCategory('functionality') { + onAcceptAll: (cookie, cookieConsent) => { + if (cookieConsent.allowedCategory('functionality')) { startOptionalFeature(); } }, @@ -160,8 +160,8 @@ This feature is enabled by default. If you'd like to disable it, you can do so b ```js initLmcCookieConsentManager( { - 'config': { - 'page_scripts': false + config: { + page_scripts: false } } ); @@ -174,12 +174,12 @@ Optional config parameters could be provided on plugin initialization in the con ```js initLmcCookieConsentManager( // when loaded as a module, these options are passed to `LmcCookieConsentManager()` instead { - 'defaultLang': 'cs', - 'autodetectLang': false, - 'onAcceptAll': (cookie, cookieConsent) => { + defaultLang: 'cs', + autodetectLang: false, + onAcceptAll: (cookie, cookieConsent) => { // custom code }, - 'config': { + config: { // overrides of default config, see https://github.com/orestbida/cookieconsent#all-available-options }, }