chefcookie 2.6.7 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,7 +4,28 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [2.6.6](https://github.com/vielhuber/chefcookie/compare/2.6.6...2.6.6)
7
+ #### [2.6.9](https://github.com/vielhuber/chefcookie/compare/2.6.9...2.6.9)
8
+
9
+ #### [2.6.9](https://github.com/vielhuber/chefcookie/compare/2.6.8...2.6.9)
10
+
11
+ > 23 July 2022
12
+
13
+ - Improve support for i dont care about cookies. [`88242de`](https://github.com/vielhuber/chefcookie/commit/88242de988c9d89ff494fcc7790bfb6dc5724613)
14
+ - Update changelog. [`b17b940`](https://github.com/vielhuber/chefcookie/commit/b17b9404599bf881fc534d7d91d938c537f44f01)
15
+
16
+ #### [2.6.8](https://github.com/vielhuber/chefcookie/compare/2.6.7...2.6.8)
17
+
18
+ > 17 July 2022
19
+
20
+ - Add support for i dont care about cookies. [`b00960b`](https://github.com/vielhuber/chefcookie/commit/b00960be070492f39c1801c0408cc102a158f951)
21
+ - Update changelog. [`30ab2ae`](https://github.com/vielhuber/chefcookie/commit/30ab2ae4382c1934917abf98fefcdb32fafb21b6)
22
+
23
+ #### [2.6.7](https://github.com/vielhuber/chefcookie/compare/2.6.6...2.6.7)
24
+
25
+ > 17 July 2022
26
+
27
+ - Improve building of minified file. [`256af8b`](https://github.com/vielhuber/chefcookie/commit/256af8b0ddb7aa35d70730903444f7f8ff58719f)
28
+ - Update changelog. [`5c313f3`](https://github.com/vielhuber/chefcookie/commit/5c313f31db8bddada7e58b3de1dc66ed8a54ea72)
8
29
 
9
30
  #### [2.6.6](https://github.com/vielhuber/chefcookie/compare/2.6.5...2.6.6)
10
31
 
package/README.md CHANGED
@@ -18,6 +18,7 @@ chefcookie is a gdpr cookie solution without compromises.
18
18
  - auto disable tracking for logged in wordpress users
19
19
  - ie11 support available
20
20
  - script grouping with optional optin on script level
21
+ - (intentionally) supports [i don't care about cookies](https://www.i-dont-care-about-cookies.eu)
21
22
 
22
23
  ## included
23
24
 
@@ -478,6 +479,15 @@ the `action`-key can have the following values:
478
479
 
479
480
  here it makes sense to temporarily store this data in a database and evaluate it – for example, to measure the discrepancy between the real visitor numbers and the numbers in google analytics or to optimize the appearance of the consent manager (e.g. using the `layout`-option).
480
481
 
482
+ #### etracker optimizer
483
+
484
+ by default the etracker optimizer is disabled, since it creates a nasty fouc. you can enable it via:
485
+
486
+ ```js
487
+ window._etr = { eoBlocked: false };
488
+ cc.load('etracker', 'xxxxxx');
489
+ ```
490
+
481
491
  #### event tracking
482
492
 
483
493
  chefcookie additionally comes with event tracking for all major analytics platforms.\
package/_build/script.js CHANGED
@@ -430,7 +430,7 @@ var chefcookie = /*#__PURE__*/function () {
430
430
  return "\n <li class=\"chefcookie__group".concat(group.cannot_be_modified ? " chefcookie__group--disabled" : "", "\">\n <label class=\"chefcookie__group-label\" for=\"chefcookie_group_").concat(i, "\">\n <input").concat(group.cannot_be_modified ? " disabled=\"disabled\"" : "", " class=\"chefcookie__group-checkbox\" data-status=\"").concat(_this5.isCheckboxActiveForGroup(i), "\" id=\"chefcookie_group_").concat(i, "\" type=\"checkbox\" name=\"chefcookie_group[]\" value=\"").concat(i, "\"").concat(_this5.isCheckboxActiveForGroup(i) === 2 ? " checked=\"checked\"" : "", " />\n <span class=\"chefcookie__group-title\">").concat(_this5.translate(group.title), "</span>\n <span class=\"chefcookie__group-checkbox-icon\"></span>\n ").concat('description' in group && group.description != '' ? "\n <span class=\"chefcookie__group-description\">".concat(_this5.translate(group.description), "</span>\n ") : "", "\n ").concat('scripts_selection' in _this5.config && _this5.config.scripts_selection === 'collapse' && 'scripts' in group && Object.keys(group.scripts).length > 0 && Object.keys(group.scripts)[0].indexOf('dummy_') === -1 ? "\n <a href=\"#\" class=\"chefcookie__group-collapse\">".concat(_this5.getLabel('group_open') != '' ? _this5.getLabel('group_open') : _this5.getLabel('settings_open'), "</a>\n ") : "", "\n </label>\n ").concat('scripts_selection' in _this5.config && _this5.config.scripts_selection !== false && 'scripts' in group && Object.keys(group.scripts).length > 0 && Object.keys(group.scripts)[0].indexOf('dummy_') === -1 ? "\n <ul class=\"chefcookie__scripts chefcookie__scripts--count-".concat(Object.keys(group.scripts).length).concat(_this5.config.scripts_selection !== 'collapse' ? " chefcookie__scripts--visible" : "", "\">\n ").concat(Object.keys(group.scripts).map(function (j) {
431
431
  return "\n <li class=\"chefcookie__script".concat(group.cannot_be_modified ? " chefcookie__script--disabled" : "", "\">\n <label class=\"chefcookie__script-label\" for=\"chefcookie_script_").concat(i, "_").concat(j, "\">\n <input").concat(group.cannot_be_modified ? " disabled=\"disabled\"" : "", " class=\"chefcookie__script-checkbox\" id=\"chefcookie_script_").concat(i, "_").concat(j, "\" type=\"checkbox\" name=\"chefcookie_script[]\" value=\"").concat(i, "|").concat(j, "\"").concat(_this5.isCheckboxActiveForProvider(i, j) ? " checked=\"checked\"" : "", " />\n <span class=\"chefcookie__script-title\">").concat((0, _typeof2.default)(group.scripts[j]) === 'object' && group.scripts[j] !== null && 'title' in group.scripts[j] && group.scripts[j].title != '' ? _this5.translate(group.scripts[j].title) : j, "</span>\n <span class=\"chefcookie__script-checkbox-icon\"></span>\n </label>\n ").concat((0, _typeof2.default)(group.scripts[j]) === 'object' && group.scripts[j] !== null && 'description' in group.scripts[j] && group.scripts[j].description != '' ? '<div class="chefcookie__script-description">' + '<a href="#" class="chefcookie__script-description-collapse">' + _this5.getLabel('details_open') + '</a>' + '<div class="chefcookie__script-description-content">' + _this5.translate(group.scripts[j].description) + '</div>' + '</div>' : '', "\n </li>\n ");
432
432
  }).join(''), "\n </ul>\n ") : "", "\n </li>\n ");
433
- }).join(''), "\n </ul>\n </div>\n <div class=\"chefcookie__buttons chefcookie__buttons--count-").concat('show_decline_button' in this.config && this.config.show_decline_button === true ? '3' : '2', "\">\n <a href=\"#chefcookie__settings\" class=\"chefcookie__button chefcookie__button--settings\">").concat(this.getLabel('settings_open'), "</a>\n <a href=\"#chefcookie__accept\" class=\"chefcookie__button chefcookie__button--accept\">").concat(this.getLabel(this.config.accept_all_if_settings_closed === undefined || this.config.accept_all_if_settings_closed === false ? 'accept' : 'accept_all'), "</a>\n ").concat('show_decline_button' in this.config && this.config.show_decline_button === true ? "\n <a href=\"#chefcookie__decline\" class=\"chefcookie__button chefcookie__button--decline\">".concat(this.getLabel('decline'), "</a>\n ") : '', "\n </div>\n </div>\n </div>\n </div>\n "));
433
+ }).join(''), "\n </ul>\n </div>\n <div class=\"chefcookie__buttons chefcookie__buttons--count-").concat('show_decline_button' in this.config && this.config.show_decline_button === true ? '3' : '2', "\">\n <a href=\"#chefcookie__settings\" class=\"chefcookie__button chefcookie__button--settings\">").concat(this.getLabel('settings_open'), "</a>\n <a href=\"#chefcookie__accept\" class=\"chefcookie__button chefcookie__button--accept cookie-compliance-ok-btn\">").concat(this.getLabel(this.config.accept_all_if_settings_closed === undefined || this.config.accept_all_if_settings_closed === false ? 'accept' : 'accept_all'), "</a>\n ").concat('show_decline_button' in this.config && this.config.show_decline_button === true ? "\n <a href=\"#chefcookie__decline\" class=\"chefcookie__button chefcookie__button--decline\">".concat(this.getLabel('decline'), "</a>\n ") : '', "\n </div>\n </div>\n </div>\n </div>\n "));
434
434
  }
435
435
  }, {
436
436
  key: "getLabel",
@@ -469,6 +469,10 @@ var chefcookie = /*#__PURE__*/function () {
469
469
  if (document.querySelector('a[href="#chefcookie__accept"]') !== null) {
470
470
  [].forEach.call(document.querySelectorAll('a[href="#chefcookie__accept"]'), function (el) {
471
471
  _this6.registerEventListener(el, 'click', function (e) {
472
+ if (_this6.isOpened === false) {
473
+ return;
474
+ }
475
+
472
476
  if (!('accept_all_if_settings_closed' in _this6.config) || _this6.config.accept_all_if_settings_closed === true) {
473
477
  if (!_this6.settingsVisible()) {
474
478
  _this6.checkAllOptIns();
@@ -1083,7 +1087,12 @@ var chefcookie = /*#__PURE__*/function () {
1083
1087
  }
1084
1088
 
1085
1089
  if (provider === 'etracker') {
1086
- var _script10 = document.createElement('script');
1090
+ var _script10;
1091
+
1092
+ _script10 = document.createElement('script');
1093
+ _script10.innerHTML = "if(window._etr === undefined) { window._etr = {eoBlocked:true}; }";
1094
+ document.head.appendChild(_script10);
1095
+ _script10 = document.createElement('script');
1087
1096
 
1088
1097
  _script10.onload = function () {
1089
1098
  _this14.setLoaded(provider);
@@ -1133,7 +1142,7 @@ var chefcookie = /*#__PURE__*/function () {
1133
1142
  }, {
1134
1143
  key: "settingsVisible",
1135
1144
  value: function settingsVisible() {
1136
- return document.querySelector('.chefcookie__settings-container').classList.contains('chefcookie__settings-container--visible');
1145
+ return document.querySelector('.chefcookie__settings-container') !== null && document.querySelector('.chefcookie__settings-container').classList.contains('chefcookie__settings-container--visible');
1137
1146
  }
1138
1147
  }, {
1139
1148
  key: "showSettings",