chefcookie 2.4.4 → 2.4.8

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/README.md CHANGED
@@ -93,8 +93,8 @@ const cc = new chefcookie({
93
93
  noscroll: true,
94
94
  fade: true,
95
95
  blur: true,
96
- css_replace: ``, // replace plugins styles with custom css
97
- css_add: `` // enhance plugins styles with custom css
96
+ css_replace: ``, // replace plugin's styles with custom css
97
+ css_add: `` // enhance plugin's styles with custom css
98
98
  },
99
99
  labels: {
100
100
  accept: { de: 'Akzeptieren', en: 'Accept' },
@@ -427,6 +427,7 @@ you can programmatically control chefcookie via javascript:
427
427
  - `cc.open()`: open the cookie banner manually
428
428
  - `cc.isOpen()`: check if cookie banner is opened
429
429
  - `cc.close()`: close the cookie banner manually
430
+ - `cc.isClosed()`: check if cookie banner is closed
430
431
  - `cc.destroy()`: destroy the cookie banner and all event listeners
431
432
  - `cc.updateOptOutOptIn()`: refreshes the state of opt out / opt in buttons
432
433
 
package/_build/_helper.js CHANGED
@@ -83,7 +83,7 @@ var helper = /*#__PURE__*/function () {
83
83
  }, {
84
84
  key: "urlHostTopLevel",
85
85
  value: function urlHostTopLevel() {
86
- var host = window.location.host;
86
+ var host = window.location.hostname;
87
87
  host = host.split('.');
88
88
 
89
89
  while (host.length > 2) {
package/_build/script.js CHANGED
@@ -137,6 +137,11 @@ var chefcookie = /*#__PURE__*/function () {
137
137
  value: function isOpen() {
138
138
  return this.isOpened;
139
139
  }
140
+ }, {
141
+ key: "isClosed",
142
+ value: function isClosed() {
143
+ return !this.isOpened;
144
+ }
140
145
  }, {
141
146
  key: "animationIn",
142
147
  value: function animationIn() {