Skip to content

Commit

Permalink
Feat: Configure plugin defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Oct 20, 2021
1 parent 703cf98 commit bd6309f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ trim_trailing_whitespace = true

[*.scss]
indent_size = 4

4 changes: 2 additions & 2 deletions demo/autoload.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<head>
<meta charset="UTF-8">
<title>Cookie Consent Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../dist/LmcCookieConsentManager.css">
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions demo/bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<head>
<meta charset="UTF-8">
<title>Cookie Consent Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../dist/LmcCookieConsentManager.css">
</head>
<body>
Expand All @@ -14,7 +14,7 @@ <h1>LMC Cookie Consent Manager Demo</h1>

<script defer src="../dist/init.js"></script>
<script>
window.addEventListener('load', function(){
window.addEventListener('load', function () {
initLmcCookieConsentManager();
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build:js": "node scripts/build.js",
"build": "yarn build:js && yarn build:css",
"format": "yarn format:check",
"format:check": "prettier --list-different 'src/**/*.{js,jsx,ts,tsx,scss}' 'scripts/*'",
"format:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx,scss}' 'scripts/*'",
"format:fix": "prettier --write 'src/**/*.{js,jsx,ts,tsx,scss}' 'scripts/*'"
},
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/LmcCookieConsentManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ const LmcCookieConsentManager = (options = defaultOptions) => {

cookieconsent.run({
current_lang: currentLang,
auto_language: true,
theme_css: themeCss,
cookie_name: 'lmc_ccm',
cookie_expiration: 365,
use_rfc_cookie: true,
autorun: true,
delay: 0,
force_consent: false,
hide_from_bots: true, // To be hidden also from Selenium
gui_options: {
consent_modal: {
layout: 'bar', // box/cloud/bar
Expand Down

0 comments on commit bd6309f

Please sign in to comment.