chefcookie 2.7.9 → 2.8.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,14 @@ 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.7.8](https://github.com/vielhuber/chefcookie/compare/2.7.8...2.7.8)
7
+ #### [2.7.9](https://github.com/vielhuber/chefcookie/compare/2.7.9...2.7.9)
8
+
9
+ #### [2.7.9](https://github.com/vielhuber/chefcookie/compare/2.7.8...2.7.9)
10
+
11
+ > 18 January 2023
12
+
13
+ - Add new config attribute lng_fallback. [`d6c0f51`](https://github.com/vielhuber/chefcookie/commit/d6c0f515b63747ad7841a3bc24fb44367964fb87)
14
+ - Update changelog. [`f9a9cbe`](https://github.com/vielhuber/chefcookie/commit/f9a9cbee8045bb0327f230af8586ab3cb4e2dea5)
8
15
 
9
16
  #### [2.7.8](https://github.com/vielhuber/chefcookie/compare/2.7.7...2.7.8)
10
17
 
package/README.md CHANGED
@@ -83,7 +83,8 @@ const cc = new chefcookie({
83
83
  lng_fallback: null, // lng code used in labels when current lng is not found (e.g. "en")
84
84
  expiration: 7, // in days
85
85
  cookie_prefix: 'cc_', // switch cookie prefix (e.g. for different pages on the same top level domain)
86
- exclude_ua_regex: /(Speed Insights|Chrome-Lighthouse|PSTS[\d\.]+)/,
86
+ exclude_ua_regex:
87
+ /(Mozilla\/5\.0 \(Linux; Android 11; moto g power \(2022\)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0.0.0 Mobile Safari\/537\.36)|(Mozilla\/5\.0 \(Macintosh; Intel Mac OS X 10_15_7\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0\.0\.0 Safari\/537\.36)|(Speed Insights)|(Chrome-Lighthouse)|(PSTS[\d\.]+)/,
87
88
  //domain: undefined,
88
89
  style: {
89
90
  layout: 'overlay', // overlay|bottombar|topbar
@@ -449,7 +450,7 @@ const cc = new chefcookie({
449
450
  });
450
451
  ```
451
452
 
452
- currently the default regex `/(Speed Insights|Chrome-Lighthouse|PSTS[\d\.]+)/` excludes Google PageSpeed Insights, Chrome Lighthouse and WebPageTest.org.
453
+ currently the default regex `/(Mozilla\/5\.0 \(Linux; Android 11; moto g power \(2022\)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0.0.0 Mobile Safari\/537\.36)|(Mozilla\/5\.0 \(Macintosh; Intel Mac OS X 10_15_7\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0\.0\.0 Safari\/537\.36)|(Speed Insights)|(Chrome-Lighthouse)|(PSTS[\d\.]+)/` excludes Google PageSpeed Insights, Chrome Lighthouse and WebPageTest.org.
453
454
 
454
455
  #### consent manager tracking
455
456
 
package/_build/script.js CHANGED
@@ -25,7 +25,7 @@ var chefcookie = /*#__PURE__*/function () {
25
25
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
26
26
  (0, _classCallCheck2.default)(this, chefcookie);
27
27
  var defaults = {
28
- exclude_ua_regex: /(Speed Insights|Chrome-Lighthouse|PSTS[\d\.]+)/,
28
+ exclude_ua_regex: /(Mozilla\/5\.0 \(Linux; Android 11; moto g power \(2022\)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0.0.0 Mobile Safari\/537\.36)|(Mozilla\/5\.0 \(Macintosh; Intel Mac OS X 10_15_7\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0\.0\.0 Safari\/537\.36)|(Speed Insights)|(Chrome-Lighthouse)|(PSTS[\d\.]+)/,
29
29
  domain: _helper.default.urlHostTopLevel()
30
30
  };
31
31
  this.config = _objectSpread(_objectSpread({}, defaults), config);
@@ -59,7 +59,7 @@ var chefcookie = /*#__PURE__*/function () {
59
59
  value: function init() {
60
60
  if (this.config.exclude_google_pagespeed === true) {
61
61
  // deprecated legacy support
62
- this.config.exclude_ua_regex = /(Speed Insights|Chrome-Lighthouse)/;
62
+ this.config.exclude_ua_regex = /(Mozilla\/5\.0 \(Linux; Android 11; moto g power \(2022\)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0.0.0 Mobile Safari\/537\.36)|(Mozilla\/5\.0 \(Macintosh; Intel Mac OS X 10_15_7\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/109\.0\.0\.0 Safari\/537\.36)|(Speed Insights)|(Chrome-Lighthouse)|(PSTS[\d\.]+)/;
63
63
  }
64
64
  if (this.config.exclude_ua_regex !== undefined && navigator.userAgent.match(this.config.exclude_ua_regex)) {
65
65
  return;