add-to-calendar-button 2.11.0 → 2.11.1

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.
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: 3D
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Date
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Flat
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Neumorphism
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Round
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Simple
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Text
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Default
7
7
  *
8
- * Version: 2.11.0
8
+ * Version: 2.11.1
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -223,14 +223,14 @@ function tzlib_get_timezones(jsonType = false) {
223
223
  * Add to Calendar Button
224
224
  * ++++++++++++++++++++++
225
225
  *
226
- * Version: 2.11.0
226
+ * Version: 2.11.1
227
227
  * Creator: Jens Kuerschner (https://jekuer.com)
228
228
  * Project: https://github.com/add2cal/add-to-calendar-button
229
229
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
230
230
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
231
231
  *
232
232
  */
233
- const atcbVersion = '2.11.0';
233
+ const atcbVersion = '2.11.1';
234
234
  const atcbCssTemplate = {};
235
235
  const atcbIsBrowser = () => {
236
236
  if (typeof window === 'undefined') {
@@ -4689,7 +4689,7 @@ async function atcb_build_button(host, data) {
4689
4689
  atcb_load_css(host, rootObj, data);
4690
4690
  atcb_setup_state_management(data);
4691
4691
  atcb_set_global_event_listener(host, data);
4692
- atcb_init_log(data.proKey, data.debug);
4692
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4693
4693
  if (!data.hidden) {
4694
4694
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
4695
4695
  if (!data.inlineRsvp) {
@@ -4997,7 +4997,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
4997
4997
  }
4998
4998
  }
4999
4999
  }
5000
- atcb_init_log(data.proKey, data.debug);
5000
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5001
5001
  if (data.debug) {
5002
5002
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5003
5003
  }
@@ -5017,7 +5017,7 @@ function atcb_setup_state_management(data) {
5017
5017
  }
5018
5018
  atcbStates[data.identifier] = singleDates;
5019
5019
  }
5020
- function atcb_init_log(pro = '', debug = false) {
5020
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5021
5021
  if (!atcbInitialGlobalInit) {
5022
5022
  const versionOutput = (function () {
5023
5023
  if (debug) {
@@ -5025,8 +5025,8 @@ function atcb_init_log(pro = '', debug = false) {
5025
5025
  }
5026
5026
  return '';
5027
5027
  })();
5028
- if (pro != '') {
5029
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5028
+ if (pro !== '') {
5029
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5030
5030
  } else {
5031
5031
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5032
5032
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5047,9 +5047,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5047
5047
  if (response.ok) {
5048
5048
  const data = await response.json();
5049
5049
  if (proOverride) {
5050
- const hostname = window?.location.hostname || '';
5050
+ const host = window?.location.hostname || '';
5051
+ const domain = host.split('.').slice(-2).join('.');
5051
5052
  atcbWcParams.forEach((key) => {
5052
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5053
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5053
5054
  data[`${key}`] = dataOverrides[`${key}`];
5054
5055
  }
5055
5056
  });
@@ -223,14 +223,14 @@ function tzlib_get_timezones(jsonType = false) {
223
223
  * Add to Calendar Button
224
224
  * ++++++++++++++++++++++
225
225
  *
226
- * Version: 2.11.0
226
+ * Version: 2.11.1
227
227
  * Creator: Jens Kuerschner (https://jekuer.com)
228
228
  * Project: https://github.com/add2cal/add-to-calendar-button
229
229
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
230
230
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
231
231
  *
232
232
  */
233
- const atcbVersion = '2.11.0';
233
+ const atcbVersion = '2.11.1';
234
234
  const atcbCssTemplate = {
235
235
  if (typeof window === 'undefined') {
236
236
  return false;
@@ -4688,7 +4688,7 @@ async function atcb_build_button(host, data) {
4688
4688
  atcb_load_css(host, rootObj, data);
4689
4689
  atcb_setup_state_management(data);
4690
4690
  atcb_set_global_event_listener(host, data);
4691
- atcb_init_log(data.proKey, data.debug);
4691
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4692
4692
  if (!data.hidden) {
4693
4693
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
4694
4694
  if (!data.inlineRsvp) {
@@ -4996,7 +4996,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
4996
4996
  }
4997
4997
  }
4998
4998
  }
4999
- atcb_init_log(data.proKey, data.debug);
4999
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5000
5000
  if (data.debug) {
5001
5001
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5002
5002
  }
@@ -5016,7 +5016,7 @@ function atcb_setup_state_management(data) {
5016
5016
  }
5017
5017
  atcbStates[data.identifier] = singleDates;
5018
5018
  }
5019
- function atcb_init_log(pro = '', debug = false) {
5019
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5020
5020
  if (!atcbInitialGlobalInit) {
5021
5021
  const versionOutput = (function () {
5022
5022
  if (debug) {
@@ -5024,8 +5024,8 @@ function atcb_init_log(pro = '', debug = false) {
5024
5024
  }
5025
5025
  return '';
5026
5026
  })();
5027
- if (pro != '') {
5028
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5027
+ if (pro !== '') {
5028
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5029
5029
  } else {
5030
5030
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5031
5031
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5046,9 +5046,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5046
5046
  if (response.ok) {
5047
5047
  const data = await response.json();
5048
5048
  if (proOverride) {
5049
- const hostname = window?.location.hostname || '';
5049
+ const host = window?.location.hostname || '';
5050
+ const domain = host.split('.').slice(-2).join('.');
5050
5051
  atcbWcParams.forEach((key) => {
5051
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5052
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5052
5053
  data[`${key}`] = dataOverrides[`${key}`];
5053
5054
  }
5054
5055
  });
@@ -223,14 +223,14 @@ function tzlib_get_timezones(jsonType = false) {
223
223
  * Add to Calendar Button
224
224
  * ++++++++++++++++++++++
225
225
  *
226
- * Version: 2.11.0
226
+ * Version: 2.11.1
227
227
  * Creator: Jens Kuerschner (https://jekuer.com)
228
228
  * Project: https://github.com/add2cal/add-to-calendar-button
229
229
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
230
230
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
231
231
  *
232
232
  */
233
- const atcbVersion = '2.11.0';
233
+ const atcbVersion = '2.11.1';
234
234
  const atcbCssTemplate = {};
235
235
  const atcbIsBrowser = () => {
236
236
  if (typeof window === 'undefined') {
@@ -5409,7 +5409,7 @@ async function atcb_build_button(host, data) {
5409
5409
  atcb_load_css(host, rootObj, data);
5410
5410
  atcb_setup_state_management(data);
5411
5411
  atcb_set_global_event_listener(host, data);
5412
- atcb_init_log(data.proKey, data.debug);
5412
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5413
5413
  if (!data.hidden) {
5414
5414
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
5415
5415
  if (!data.inlineRsvp) {
@@ -5717,7 +5717,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
5717
5717
  }
5718
5718
  }
5719
5719
  }
5720
- atcb_init_log(data.proKey, data.debug);
5720
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5721
5721
  if (data.debug) {
5722
5722
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5723
5723
  }
@@ -5737,7 +5737,7 @@ function atcb_setup_state_management(data) {
5737
5737
  }
5738
5738
  atcbStates[data.identifier] = singleDates;
5739
5739
  }
5740
- function atcb_init_log(pro = '', debug = false) {
5740
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5741
5741
  if (!atcbInitialGlobalInit) {
5742
5742
  const versionOutput = (function () {
5743
5743
  if (debug) {
@@ -5745,8 +5745,8 @@ function atcb_init_log(pro = '', debug = false) {
5745
5745
  }
5746
5746
  return '';
5747
5747
  })();
5748
- if (pro != '') {
5749
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5748
+ if (pro !== '') {
5749
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5750
5750
  } else {
5751
5751
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5752
5752
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5767,9 +5767,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5767
5767
  if (response.ok) {
5768
5768
  const data = await response.json();
5769
5769
  if (proOverride) {
5770
- const hostname = window?.location.hostname || '';
5770
+ const host = window?.location.hostname || '';
5771
+ const domain = host.split('.').slice(-2).join('.');
5771
5772
  atcbWcParams.forEach((key) => {
5772
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5773
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5773
5774
  data[`${key}`] = dataOverrides[`${key}`];
5774
5775
  }
5775
5776
  });
package/dist/atcb.js CHANGED
@@ -223,14 +223,14 @@ function tzlib_get_timezones(jsonType = false) {
223
223
  * Add to Calendar Button
224
224
  * ++++++++++++++++++++++
225
225
  *
226
- * Version: 2.11.0
226
+ * Version: 2.11.1
227
227
  * Creator: Jens Kuerschner (https://jekuer.com)
228
228
  * Project: https://github.com/add2cal/add-to-calendar-button
229
229
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
230
230
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
231
231
  *
232
232
  */
233
- const atcbVersion = '2.11.0';
233
+ const atcbVersion = '2.11.1';
234
234
  const atcbCssTemplate = {
235
235
  if (typeof window === 'undefined') {
236
236
  return false;
@@ -5408,7 +5408,7 @@ async function atcb_build_button(host, data) {
5408
5408
  atcb_load_css(host, rootObj, data);
5409
5409
  atcb_setup_state_management(data);
5410
5410
  atcb_set_global_event_listener(host, data);
5411
- atcb_init_log(data.proKey, data.debug);
5411
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5412
5412
  if (!data.hidden) {
5413
5413
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
5414
5414
  if (!data.inlineRsvp) {
@@ -5716,7 +5716,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
5716
5716
  }
5717
5717
  }
5718
5718
  }
5719
- atcb_init_log(data.proKey, data.debug);
5719
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5720
5720
  if (data.debug) {
5721
5721
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5722
5722
  }
@@ -5736,7 +5736,7 @@ function atcb_setup_state_management(data) {
5736
5736
  }
5737
5737
  atcbStates[data.identifier] = singleDates;
5738
5738
  }
5739
- function atcb_init_log(pro = '', debug = false) {
5739
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5740
5740
  if (!atcbInitialGlobalInit) {
5741
5741
  const versionOutput = (function () {
5742
5742
  if (debug) {
@@ -5744,8 +5744,8 @@ function atcb_init_log(pro = '', debug = false) {
5744
5744
  }
5745
5745
  return '';
5746
5746
  })();
5747
- if (pro != '') {
5748
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5747
+ if (pro !== '') {
5748
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5749
5749
  } else {
5750
5750
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5751
5751
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5766,9 +5766,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5766
5766
  if (response.ok) {
5767
5767
  const data = await response.json();
5768
5768
  if (proOverride) {
5769
- const hostname = window?.location.hostname || '';
5769
+ const host = window?.location.hostname || '';
5770
+ const domain = host.split('.').slice(-2).join('.');
5770
5771
  atcbWcParams.forEach((key) => {
5771
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5772
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5772
5773
  data[`${key}`] = dataOverrides[`${key}`];
5773
5774
  }
5774
5775
  });
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {
18
18
  if (typeof window === 'undefined') {
19
19
  return false;
@@ -5191,7 +5191,7 @@ async function atcb_build_button(host, data) {
5191
5191
  atcb_load_css(host, rootObj, data);
5192
5192
  atcb_setup_state_management(data);
5193
5193
  atcb_set_global_event_listener(host, data);
5194
- atcb_init_log(data.proKey, data.debug);
5194
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5195
5195
  if (!data.hidden) {
5196
5196
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
5197
5197
  if (!data.inlineRsvp) {
@@ -5499,7 +5499,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
5499
5499
  }
5500
5500
  }
5501
5501
  }
5502
- atcb_init_log(data.proKey, data.debug);
5502
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5503
5503
  if (data.debug) {
5504
5504
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5505
5505
  }
@@ -5519,7 +5519,7 @@ function atcb_setup_state_management(data) {
5519
5519
  }
5520
5520
  atcbStates[data.identifier] = singleDates;
5521
5521
  }
5522
- function atcb_init_log(pro = '', debug = false) {
5522
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5523
5523
  if (!atcbInitialGlobalInit) {
5524
5524
  const versionOutput = (function () {
5525
5525
  if (debug) {
@@ -5527,8 +5527,8 @@ function atcb_init_log(pro = '', debug = false) {
5527
5527
  }
5528
5528
  return '';
5529
5529
  })();
5530
- if (pro != '') {
5531
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5530
+ if (pro !== '') {
5531
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5532
5532
  } else {
5533
5533
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5534
5534
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5549,9 +5549,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5549
5549
  if (response.ok) {
5550
5550
  const data = await response.json();
5551
5551
  if (proOverride) {
5552
- const hostname = window?.location.hostname || '';
5552
+ const host = window?.location.hostname || '';
5553
+ const domain = host.split('.').slice(-2).join('.');
5553
5554
  atcbWcParams.forEach((key) => {
5554
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5555
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5555
5556
  data[`${key}`] = dataOverrides[`${key}`];
5556
5557
  }
5557
5558
  });
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {
18
18
  if (typeof window === 'undefined') {
19
19
  return false;
@@ -4471,7 +4471,7 @@ async function atcb_build_button(host, data) {
4471
4471
  atcb_load_css(host, rootObj, data);
4472
4472
  atcb_setup_state_management(data);
4473
4473
  atcb_set_global_event_listener(host, data);
4474
- atcb_init_log(data.proKey, data.debug);
4474
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4475
4475
  if (!data.hidden) {
4476
4476
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
4477
4477
  if (!data.inlineRsvp) {
@@ -4779,7 +4779,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
4779
4779
  }
4780
4780
  }
4781
4781
  }
4782
- atcb_init_log(data.proKey, data.debug);
4782
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4783
4783
  if (data.debug) {
4784
4784
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
4785
4785
  }
@@ -4799,7 +4799,7 @@ function atcb_setup_state_management(data) {
4799
4799
  }
4800
4800
  atcbStates[data.identifier] = singleDates;
4801
4801
  }
4802
- function atcb_init_log(pro = '', debug = false) {
4802
+ function atcb_init_log(pro = '', hide = false, debug = false) {
4803
4803
  if (!atcbInitialGlobalInit) {
4804
4804
  const versionOutput = (function () {
4805
4805
  if (debug) {
@@ -4807,8 +4807,8 @@ function atcb_init_log(pro = '', debug = false) {
4807
4807
  }
4808
4808
  return '';
4809
4809
  })();
4810
- if (pro != '') {
4811
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4810
+ if (pro !== '') {
4811
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4812
4812
  } else {
4813
4813
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
4814
4814
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -4829,9 +4829,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
4829
4829
  if (response.ok) {
4830
4830
  const data = await response.json();
4831
4831
  if (proOverride) {
4832
- const hostname = window?.location.hostname || '';
4832
+ const host = window?.location.hostname || '';
4833
+ const domain = host.split('.').slice(-2).join('.');
4833
4834
  atcbWcParams.forEach((key) => {
4834
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
4835
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
4835
4836
  data[`${key}`] = dataOverrides[`${key}`];
4836
4837
  }
4837
4838
  });
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {};
18
18
  const atcbIsBrowser = () => {
19
19
  if (typeof window === 'undefined') {
@@ -4472,7 +4472,7 @@ async function atcb_build_button(host, data) {
4472
4472
  atcb_load_css(host, rootObj, data);
4473
4473
  atcb_setup_state_management(data);
4474
4474
  atcb_set_global_event_listener(host, data);
4475
- atcb_init_log(data.proKey, data.debug);
4475
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4476
4476
  if (!data.hidden) {
4477
4477
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
4478
4478
  if (!data.inlineRsvp) {
@@ -4780,7 +4780,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
4780
4780
  }
4781
4781
  }
4782
4782
  }
4783
- atcb_init_log(data.proKey, data.debug);
4783
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4784
4784
  if (data.debug) {
4785
4785
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
4786
4786
  }
@@ -4800,7 +4800,7 @@ function atcb_setup_state_management(data) {
4800
4800
  }
4801
4801
  atcbStates[data.identifier] = singleDates;
4802
4802
  }
4803
- function atcb_init_log(pro = '', debug = false) {
4803
+ function atcb_init_log(pro = '', hide = false, debug = false) {
4804
4804
  if (!atcbInitialGlobalInit) {
4805
4805
  const versionOutput = (function () {
4806
4806
  if (debug) {
@@ -4808,8 +4808,8 @@ function atcb_init_log(pro = '', debug = false) {
4808
4808
  }
4809
4809
  return '';
4810
4810
  })();
4811
- if (pro != '') {
4812
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4811
+ if (pro !== '') {
4812
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4813
4813
  } else {
4814
4814
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
4815
4815
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -4830,9 +4830,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
4830
4830
  if (response.ok) {
4831
4831
  const data = await response.json();
4832
4832
  if (proOverride) {
4833
- const hostname = window?.location.hostname || '';
4833
+ const host = window?.location.hostname || '';
4834
+ const domain = host.split('.').slice(-2).join('.');
4834
4835
  atcbWcParams.forEach((key) => {
4835
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
4836
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
4836
4837
  data[`${key}`] = dataOverrides[`${key}`];
4837
4838
  }
4838
4839
  });
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {};
18
18
  const atcbIsBrowser = () => {
19
19
  if (typeof window === 'undefined') {
@@ -5192,7 +5192,7 @@ async function atcb_build_button(host, data) {
5192
5192
  atcb_load_css(host, rootObj, data);
5193
5193
  atcb_setup_state_management(data);
5194
5194
  atcb_set_global_event_listener(host, data);
5195
- atcb_init_log(data.proKey, data.debug);
5195
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5196
5196
  if (!data.hidden) {
5197
5197
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
5198
5198
  if (!data.inlineRsvp) {
@@ -5500,7 +5500,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
5500
5500
  }
5501
5501
  }
5502
5502
  }
5503
- atcb_init_log(data.proKey, data.debug);
5503
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5504
5504
  if (data.debug) {
5505
5505
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5506
5506
  }
@@ -5520,7 +5520,7 @@ function atcb_setup_state_management(data) {
5520
5520
  }
5521
5521
  atcbStates[data.identifier] = singleDates;
5522
5522
  }
5523
- function atcb_init_log(pro = '', debug = false) {
5523
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5524
5524
  if (!atcbInitialGlobalInit) {
5525
5525
  const versionOutput = (function () {
5526
5526
  if (debug) {
@@ -5528,8 +5528,8 @@ function atcb_init_log(pro = '', debug = false) {
5528
5528
  }
5529
5529
  return '';
5530
5530
  })();
5531
- if (pro != '') {
5532
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5531
+ if (pro !== '') {
5532
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5533
5533
  } else {
5534
5534
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5535
5535
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5550,9 +5550,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5550
5550
  if (response.ok) {
5551
5551
  const data = await response.json();
5552
5552
  if (proOverride) {
5553
- const hostname = window?.location.hostname || '';
5553
+ const host = window?.location.hostname || '';
5554
+ const domain = host.split('.').slice(-2).join('.');
5554
5555
  atcbWcParams.forEach((key) => {
5555
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5556
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5556
5557
  data[`${key}`] = dataOverrides[`${key}`];
5557
5558
  }
5558
5559
  });
@@ -6,14 +6,14 @@ import { tzlib_get_ical_block, tzlib_get_offset, tzlib_get_timezones } from 'tim
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {
18
18
  if (typeof window === 'undefined') {
19
19
  return false;
@@ -5191,7 +5191,7 @@ async function atcb_build_button(host, data) {
5191
5191
  atcb_load_css(host, rootObj, data);
5192
5192
  atcb_setup_state_management(data);
5193
5193
  atcb_set_global_event_listener(host, data);
5194
- atcb_init_log(data.proKey, data.debug);
5194
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5195
5195
  if (!data.hidden) {
5196
5196
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
5197
5197
  if (!data.inlineRsvp) {
@@ -5499,7 +5499,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
5499
5499
  }
5500
5500
  }
5501
5501
  }
5502
- atcb_init_log(data.proKey, data.debug);
5502
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5503
5503
  if (data.debug) {
5504
5504
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5505
5505
  }
@@ -5519,7 +5519,7 @@ function atcb_setup_state_management(data) {
5519
5519
  }
5520
5520
  atcbStates[data.identifier] = singleDates;
5521
5521
  }
5522
- function atcb_init_log(pro = '', debug = false) {
5522
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5523
5523
  if (!atcbInitialGlobalInit) {
5524
5524
  const versionOutput = (function () {
5525
5525
  if (debug) {
@@ -5527,8 +5527,8 @@ function atcb_init_log(pro = '', debug = false) {
5527
5527
  }
5528
5528
  return '';
5529
5529
  })();
5530
- if (pro != '') {
5531
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5530
+ if (pro !== '') {
5531
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5532
5532
  } else {
5533
5533
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5534
5534
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5549,9 +5549,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5549
5549
  if (response.ok) {
5550
5550
  const data = await response.json();
5551
5551
  if (proOverride) {
5552
- const hostname = window?.location.hostname || '';
5552
+ const host = window?.location.hostname || '';
5553
+ const domain = host.split('.').slice(-2).join('.');
5553
5554
  atcbWcParams.forEach((key) => {
5554
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5555
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5555
5556
  data[`${key}`] = dataOverrides[`${key}`];
5556
5557
  }
5557
5558
  });
@@ -6,14 +6,14 @@ import { tzlib_get_ical_block, tzlib_get_offset, tzlib_get_timezones } from 'tim
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {
18
18
  if (typeof window === 'undefined') {
19
19
  return false;
@@ -4471,7 +4471,7 @@ async function atcb_build_button(host, data) {
4471
4471
  atcb_load_css(host, rootObj, data);
4472
4472
  atcb_setup_state_management(data);
4473
4473
  atcb_set_global_event_listener(host, data);
4474
- atcb_init_log(data.proKey, data.debug);
4474
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4475
4475
  if (!data.hidden) {
4476
4476
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
4477
4477
  if (!data.inlineRsvp) {
@@ -4779,7 +4779,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
4779
4779
  }
4780
4780
  }
4781
4781
  }
4782
- atcb_init_log(data.proKey, data.debug);
4782
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4783
4783
  if (data.debug) {
4784
4784
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
4785
4785
  }
@@ -4799,7 +4799,7 @@ function atcb_setup_state_management(data) {
4799
4799
  }
4800
4800
  atcbStates[data.identifier] = singleDates;
4801
4801
  }
4802
- function atcb_init_log(pro = '', debug = false) {
4802
+ function atcb_init_log(pro = '', hide = false, debug = false) {
4803
4803
  if (!atcbInitialGlobalInit) {
4804
4804
  const versionOutput = (function () {
4805
4805
  if (debug) {
@@ -4807,8 +4807,8 @@ function atcb_init_log(pro = '', debug = false) {
4807
4807
  }
4808
4808
  return '';
4809
4809
  })();
4810
- if (pro != '') {
4811
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4810
+ if (pro !== '') {
4811
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4812
4812
  } else {
4813
4813
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
4814
4814
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -4829,9 +4829,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
4829
4829
  if (response.ok) {
4830
4830
  const data = await response.json();
4831
4831
  if (proOverride) {
4832
- const hostname = window?.location.hostname || '';
4832
+ const host = window?.location.hostname || '';
4833
+ const domain = host.split('.').slice(-2).join('.');
4833
4834
  atcbWcParams.forEach((key) => {
4834
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
4835
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
4835
4836
  data[`${key}`] = dataOverrides[`${key}`];
4836
4837
  }
4837
4838
  });
@@ -6,14 +6,14 @@ import { tzlib_get_ical_block, tzlib_get_offset, tzlib_get_timezones } from 'tim
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {};
18
18
  const atcbIsBrowser = () => {
19
19
  if (typeof window === 'undefined') {
@@ -4472,7 +4472,7 @@ async function atcb_build_button(host, data) {
4472
4472
  atcb_load_css(host, rootObj, data);
4473
4473
  atcb_setup_state_management(data);
4474
4474
  atcb_set_global_event_listener(host, data);
4475
- atcb_init_log(data.proKey, data.debug);
4475
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4476
4476
  if (!data.hidden) {
4477
4477
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
4478
4478
  if (!data.inlineRsvp) {
@@ -4780,7 +4780,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
4780
4780
  }
4781
4781
  }
4782
4782
  }
4783
- atcb_init_log(data.proKey, data.debug);
4783
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
4784
4784
  if (data.debug) {
4785
4785
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
4786
4786
  }
@@ -4800,7 +4800,7 @@ function atcb_setup_state_management(data) {
4800
4800
  }
4801
4801
  atcbStates[data.identifier] = singleDates;
4802
4802
  }
4803
- function atcb_init_log(pro = '', debug = false) {
4803
+ function atcb_init_log(pro = '', hide = false, debug = false) {
4804
4804
  if (!atcbInitialGlobalInit) {
4805
4805
  const versionOutput = (function () {
4806
4806
  if (debug) {
@@ -4808,8 +4808,8 @@ function atcb_init_log(pro = '', debug = false) {
4808
4808
  }
4809
4809
  return '';
4810
4810
  })();
4811
- if (pro != '') {
4812
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4811
+ if (pro !== '') {
4812
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
4813
4813
  } else {
4814
4814
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
4815
4815
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -4830,9 +4830,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
4830
4830
  if (response.ok) {
4831
4831
  const data = await response.json();
4832
4832
  if (proOverride) {
4833
- const hostname = window?.location.hostname || '';
4833
+ const host = window?.location.hostname || '';
4834
+ const domain = host.split('.').slice(-2).join('.');
4834
4835
  atcbWcParams.forEach((key) => {
4835
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
4836
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
4836
4837
  data[`${key}`] = dataOverrides[`${key}`];
4837
4838
  }
4838
4839
  });
@@ -6,14 +6,14 @@ import { tzlib_get_ical_block, tzlib_get_offset, tzlib_get_timezones } from 'tim
6
6
  * Add to Calendar Button
7
7
  * ++++++++++++++++++++++
8
8
  *
9
- * Version: 2.11.0
9
+ * Version: 2.11.1
10
10
  * Creator: Jens Kuerschner (https://jekuer.com)
11
11
  * Project: https://github.com/add2cal/add-to-calendar-button
12
12
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
13
13
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
14
14
  *
15
15
  */
16
- const atcbVersion = '2.11.0';
16
+ const atcbVersion = '2.11.1';
17
17
  const atcbCssTemplate = {};
18
18
  const atcbIsBrowser = () => {
19
19
  if (typeof window === 'undefined') {
@@ -5192,7 +5192,7 @@ async function atcb_build_button(host, data) {
5192
5192
  atcb_load_css(host, rootObj, data);
5193
5193
  atcb_setup_state_management(data);
5194
5194
  atcb_set_global_event_listener(host, data);
5195
- atcb_init_log(data.proKey, data.debug);
5195
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5196
5196
  if (!data.hidden) {
5197
5197
  if (typeof atcb_generate_rsvp_form === 'function' && data.rsvp && Object.keys(data.rsvp).length > 0) {
5198
5198
  if (!data.inlineRsvp) {
@@ -5500,7 +5500,7 @@ async function atcb_action(inputData, triggerElement, keyboardTrigger = false) {
5500
5500
  }
5501
5501
  }
5502
5502
  }
5503
- atcb_init_log(data.proKey, data.debug);
5503
+ atcb_init_log(data.proKey, data.hideBranding, data.debug);
5504
5504
  if (data.debug) {
5505
5505
  console.log('Add to Calendar Button "' + data.identifier + '" triggered');
5506
5506
  }
@@ -5520,7 +5520,7 @@ function atcb_setup_state_management(data) {
5520
5520
  }
5521
5521
  atcbStates[data.identifier] = singleDates;
5522
5522
  }
5523
- function atcb_init_log(pro = '', debug = false) {
5523
+ function atcb_init_log(pro = '', hide = false, debug = false) {
5524
5524
  if (!atcbInitialGlobalInit) {
5525
5525
  const versionOutput = (function () {
5526
5526
  if (debug) {
@@ -5528,8 +5528,8 @@ function atcb_init_log(pro = '', debug = false) {
5528
5528
  }
5529
5529
  return '';
5530
5530
  })();
5531
- if (pro != '') {
5532
- console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5531
+ if (pro !== '') {
5532
+ if (!hide || debug) console.log('Add to Calendar PRO script initialized' + versionOutput + ' | https://add-to-calendar-pro.com');
5533
5533
  } else {
5534
5534
  console.log('%c\nAdd to Calendar Button script initialized' + versionOutput + '\n' + 'see https://add-to-calendar-button.com for details.\n', 'font-weight: bold;');
5535
5535
  console.log('✨ %cPRO version available at https://add-to-calendar-pro.com ← check it out!', 'font-weight: bold; line-height: 60px;');
@@ -5550,9 +5550,10 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5550
5550
  if (response.ok) {
5551
5551
  const data = await response.json();
5552
5552
  if (proOverride) {
5553
- const hostname = window?.location.hostname || '';
5553
+ const host = window?.location.hostname || '';
5554
+ const domain = host.split('.').slice(-2).join('.');
5554
5555
  atcbWcParams.forEach((key) => {
5555
- if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || hostname === 'caldn.net') {
5556
+ if ((Object.prototype.hasOwnProperty.call(dataOverrides, key) && ['hideBranding', 'ty', 'rsvp'].indexOf(key) === -1) || domain === 'caldn.net' || domain === 'add-to-calendar-pro.com') {
5556
5557
  data[`${key}`] = dataOverrides[`${key}`];
5557
5558
  }
5558
5559
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-to-calendar-button",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "engines": {
5
5
  "node": ">=18.17.0",
6
6
  "npm": ">=9.6.7"