add-to-calendar-button 2.8.3 → 2.8.5
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/assets/css/atcb-3d.css +1 -1
- package/assets/css/atcb-date.css +1 -1
- package/assets/css/atcb-flat.css +1 -1
- package/assets/css/atcb-neumorphism.css +1 -1
- package/assets/css/atcb-round.css +1 -1
- package/assets/css/atcb-text.css +1 -1
- package/assets/css/atcb.css +1 -1
- package/dist/atcb-no-pro-unstyle.js +12 -9
- package/dist/atcb-no-pro.js +12 -9
- package/dist/atcb-unstyle.js +12 -9
- package/dist/atcb.js +12 -9
- package/dist/commonjs/index.js +12 -9
- package/dist/commonjs/no-pro/index.js +12 -9
- package/dist/commonjs/no-pro-unstyle/index.js +12 -9
- package/dist/commonjs/unstyle/index.js +12 -9
- package/dist/module/index.js +12 -9
- package/dist/module/no-pro/index.js +12 -9
- package/dist/module/no-pro-unstyle/index.js +12 -9
- package/dist/module/unstyle/index.js +12 -9
- package/package.json +2 -2
package/assets/css/atcb-3d.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Style: 3D
|
|
7
7
|
*
|
|
8
|
-
* Version: 2.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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)
|
package/assets/css/atcb-date.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Style: Date
|
|
7
7
|
*
|
|
8
|
-
* Version: 2.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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)
|
package/assets/css/atcb-flat.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Style: Flat
|
|
7
7
|
*
|
|
8
|
-
* Version: 2.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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)
|
package/assets/css/atcb-text.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Style: Text
|
|
7
7
|
*
|
|
8
|
-
* Version: 2.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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)
|
package/assets/css/atcb.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Style: Default
|
|
7
7
|
*
|
|
8
|
-
* Version: 2.8.
|
|
8
|
+
* Version: 2.8.5
|
|
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.8.
|
|
226
|
+
* Version: 2.8.5
|
|
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.8.
|
|
233
|
+
const atcbVersion = '2.8.5';
|
|
234
234
|
const atcbCssTemplate = {};
|
|
235
235
|
const atcbIsBrowser = () => {
|
|
236
236
|
if (typeof window === 'undefined') {
|
|
@@ -2460,20 +2460,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2460
2460
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2461
2461
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2462
2462
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2463
|
-
|
|
2464
|
-
let isGoogleCal = false;
|
|
2463
|
+
let isGoogleCalId = false;
|
|
2465
2464
|
const newFileUrl = (function () {
|
|
2466
|
-
if (
|
|
2467
|
-
|
|
2465
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2466
|
+
isGoogleCalId = true;
|
|
2468
2467
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2469
2468
|
}
|
|
2470
2469
|
return encodeURIComponent(fileUrl);
|
|
2471
2470
|
})();
|
|
2472
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2471
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2473
2472
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2474
2473
|
return;
|
|
2475
2474
|
}
|
|
2476
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2475
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2477
2476
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2478
2477
|
return;
|
|
2479
2478
|
}
|
|
@@ -2494,7 +2493,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2494
2493
|
}
|
|
2495
2494
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2496
2495
|
const urlParts = [];
|
|
2497
|
-
|
|
2496
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2497
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
2498
|
+
} else {
|
|
2499
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
2500
|
+
}
|
|
2498
2501
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
2499
2502
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
2500
2503
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
package/dist/atcb-no-pro.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.8.
|
|
226
|
+
* Version: 2.8.5
|
|
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.8.
|
|
233
|
+
const atcbVersion = '2.8.5';
|
|
234
234
|
const atcbCssTemplate = {
|
|
235
235
|
if (typeof window === 'undefined') {
|
|
236
236
|
return false;
|
|
@@ -2459,20 +2459,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2459
2459
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2460
2460
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2461
2461
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2462
|
-
|
|
2463
|
-
let isGoogleCal = false;
|
|
2462
|
+
let isGoogleCalId = false;
|
|
2464
2463
|
const newFileUrl = (function () {
|
|
2465
|
-
if (
|
|
2466
|
-
|
|
2464
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2465
|
+
isGoogleCalId = true;
|
|
2467
2466
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2468
2467
|
}
|
|
2469
2468
|
return encodeURIComponent(fileUrl);
|
|
2470
2469
|
})();
|
|
2471
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2470
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2472
2471
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2473
2472
|
return;
|
|
2474
2473
|
}
|
|
2475
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2474
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2476
2475
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2477
2476
|
return;
|
|
2478
2477
|
}
|
|
@@ -2493,7 +2492,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2493
2492
|
}
|
|
2494
2493
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2495
2494
|
const urlParts = [];
|
|
2496
|
-
|
|
2495
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2496
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
2497
|
+
} else {
|
|
2498
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
2499
|
+
}
|
|
2497
2500
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
2498
2501
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
2499
2502
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
package/dist/atcb-unstyle.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.8.
|
|
226
|
+
* Version: 2.8.5
|
|
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.8.
|
|
233
|
+
const atcbVersion = '2.8.5';
|
|
234
234
|
const atcbCssTemplate = {};
|
|
235
235
|
const atcbIsBrowser = () => {
|
|
236
236
|
if (typeof window === 'undefined') {
|
|
@@ -3180,20 +3180,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
3180
3180
|
function atcb_subscribe_google(data, fileUrl) {
|
|
3181
3181
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
3182
3182
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
3183
|
-
|
|
3184
|
-
let isGoogleCal = false;
|
|
3183
|
+
let isGoogleCalId = false;
|
|
3185
3184
|
const newFileUrl = (function () {
|
|
3186
|
-
if (
|
|
3187
|
-
|
|
3185
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
3186
|
+
isGoogleCalId = true;
|
|
3188
3187
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
3189
3188
|
}
|
|
3190
3189
|
return encodeURIComponent(fileUrl);
|
|
3191
3190
|
})();
|
|
3192
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
3191
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
3193
3192
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
3194
3193
|
return;
|
|
3195
3194
|
}
|
|
3196
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
3195
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
3197
3196
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
3198
3197
|
return;
|
|
3199
3198
|
}
|
|
@@ -3214,7 +3213,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
3214
3213
|
}
|
|
3215
3214
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
3216
3215
|
const urlParts = [];
|
|
3217
|
-
|
|
3216
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
3217
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
3218
|
+
} else {
|
|
3219
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
3220
|
+
}
|
|
3218
3221
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
3219
3222
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
3220
3223
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
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.8.
|
|
226
|
+
* Version: 2.8.5
|
|
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.8.
|
|
233
|
+
const atcbVersion = '2.8.5';
|
|
234
234
|
const atcbCssTemplate = {
|
|
235
235
|
if (typeof window === 'undefined') {
|
|
236
236
|
return false;
|
|
@@ -3179,20 +3179,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
3179
3179
|
function atcb_subscribe_google(data, fileUrl) {
|
|
3180
3180
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
3181
3181
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
3182
|
-
|
|
3183
|
-
let isGoogleCal = false;
|
|
3182
|
+
let isGoogleCalId = false;
|
|
3184
3183
|
const newFileUrl = (function () {
|
|
3185
|
-
if (
|
|
3186
|
-
|
|
3184
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
3185
|
+
isGoogleCalId = true;
|
|
3187
3186
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
3188
3187
|
}
|
|
3189
3188
|
return encodeURIComponent(fileUrl);
|
|
3190
3189
|
})();
|
|
3191
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
3190
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
3192
3191
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
3193
3192
|
return;
|
|
3194
3193
|
}
|
|
3195
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
3194
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
3196
3195
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
3197
3196
|
return;
|
|
3198
3197
|
}
|
|
@@ -3213,7 +3212,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
3213
3212
|
}
|
|
3214
3213
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
3215
3214
|
const urlParts = [];
|
|
3216
|
-
|
|
3215
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
3216
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
3217
|
+
} else {
|
|
3218
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
3219
|
+
}
|
|
3217
3220
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
3218
3221
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
3219
3222
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
package/dist/commonjs/index.js
CHANGED
|
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
|
|
|
6
6
|
* Add to Calendar Button
|
|
7
7
|
* ++++++++++++++++++++++
|
|
8
8
|
*
|
|
9
|
-
* Version: 2.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {
|
|
18
18
|
if (typeof window === 'undefined') {
|
|
19
19
|
return false;
|
|
@@ -2962,20 +2962,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2962
2962
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2963
2963
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2964
2964
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2965
|
-
|
|
2966
|
-
let isGoogleCal = false;
|
|
2965
|
+
let isGoogleCalId = false;
|
|
2967
2966
|
const newFileUrl = (function () {
|
|
2968
|
-
if (
|
|
2969
|
-
|
|
2967
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2968
|
+
isGoogleCalId = true;
|
|
2970
2969
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2971
2970
|
}
|
|
2972
2971
|
return encodeURIComponent(fileUrl);
|
|
2973
2972
|
})();
|
|
2974
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2973
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2975
2974
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2976
2975
|
return;
|
|
2977
2976
|
}
|
|
2978
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2977
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2979
2978
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2980
2979
|
return;
|
|
2981
2980
|
}
|
|
@@ -2996,7 +2995,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2996
2995
|
}
|
|
2997
2996
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2998
2997
|
const urlParts = [];
|
|
2999
|
-
|
|
2998
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2999
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
3000
|
+
} else {
|
|
3001
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
3002
|
+
}
|
|
3000
3003
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
3001
3004
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
3002
3005
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
|
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
|
|
|
6
6
|
* Add to Calendar Button
|
|
7
7
|
* ++++++++++++++++++++++
|
|
8
8
|
*
|
|
9
|
-
* Version: 2.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {
|
|
18
18
|
if (typeof window === 'undefined') {
|
|
19
19
|
return false;
|
|
@@ -2242,20 +2242,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2242
2242
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2243
2243
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2244
2244
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2245
|
-
|
|
2246
|
-
let isGoogleCal = false;
|
|
2245
|
+
let isGoogleCalId = false;
|
|
2247
2246
|
const newFileUrl = (function () {
|
|
2248
|
-
if (
|
|
2249
|
-
|
|
2247
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2248
|
+
isGoogleCalId = true;
|
|
2250
2249
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2251
2250
|
}
|
|
2252
2251
|
return encodeURIComponent(fileUrl);
|
|
2253
2252
|
})();
|
|
2254
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2253
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2255
2254
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2256
2255
|
return;
|
|
2257
2256
|
}
|
|
2258
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2257
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2259
2258
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2260
2259
|
return;
|
|
2261
2260
|
}
|
|
@@ -2276,7 +2275,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2276
2275
|
}
|
|
2277
2276
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2278
2277
|
const urlParts = [];
|
|
2279
|
-
|
|
2278
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2279
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
2280
|
+
} else {
|
|
2281
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
2282
|
+
}
|
|
2280
2283
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
2281
2284
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
2282
2285
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
|
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
|
|
|
6
6
|
* Add to Calendar Button
|
|
7
7
|
* ++++++++++++++++++++++
|
|
8
8
|
*
|
|
9
|
-
* Version: 2.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {};
|
|
18
18
|
const atcbIsBrowser = () => {
|
|
19
19
|
if (typeof window === 'undefined') {
|
|
@@ -2243,20 +2243,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2243
2243
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2244
2244
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2245
2245
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2246
|
-
|
|
2247
|
-
let isGoogleCal = false;
|
|
2246
|
+
let isGoogleCalId = false;
|
|
2248
2247
|
const newFileUrl = (function () {
|
|
2249
|
-
if (
|
|
2250
|
-
|
|
2248
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2249
|
+
isGoogleCalId = true;
|
|
2251
2250
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2252
2251
|
}
|
|
2253
2252
|
return encodeURIComponent(fileUrl);
|
|
2254
2253
|
})();
|
|
2255
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2254
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2256
2255
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2257
2256
|
return;
|
|
2258
2257
|
}
|
|
2259
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2258
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2260
2259
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2261
2260
|
return;
|
|
2262
2261
|
}
|
|
@@ -2277,7 +2276,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2277
2276
|
}
|
|
2278
2277
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2279
2278
|
const urlParts = [];
|
|
2280
|
-
|
|
2279
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2280
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
2281
|
+
} else {
|
|
2282
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
2283
|
+
}
|
|
2281
2284
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
2282
2285
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
2283
2286
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
|
@@ -6,14 +6,14 @@ const tzlibActions = require('timezones-ical-library');
|
|
|
6
6
|
* Add to Calendar Button
|
|
7
7
|
* ++++++++++++++++++++++
|
|
8
8
|
*
|
|
9
|
-
* Version: 2.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {};
|
|
18
18
|
const atcbIsBrowser = () => {
|
|
19
19
|
if (typeof window === 'undefined') {
|
|
@@ -2963,20 +2963,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2963
2963
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2964
2964
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2965
2965
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2966
|
-
|
|
2967
|
-
let isGoogleCal = false;
|
|
2966
|
+
let isGoogleCalId = false;
|
|
2968
2967
|
const newFileUrl = (function () {
|
|
2969
|
-
if (
|
|
2970
|
-
|
|
2968
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2969
|
+
isGoogleCalId = true;
|
|
2971
2970
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2972
2971
|
}
|
|
2973
2972
|
return encodeURIComponent(fileUrl);
|
|
2974
2973
|
})();
|
|
2975
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2974
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2976
2975
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2977
2976
|
return;
|
|
2978
2977
|
}
|
|
2979
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2978
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2980
2979
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2981
2980
|
return;
|
|
2982
2981
|
}
|
|
@@ -2997,7 +2996,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2997
2996
|
}
|
|
2998
2997
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2999
2998
|
const urlParts = [];
|
|
3000
|
-
|
|
2999
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
3000
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
3001
|
+
} else {
|
|
3002
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
3003
|
+
}
|
|
3001
3004
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
3002
3005
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
3003
3006
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
package/dist/module/index.js
CHANGED
|
@@ -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.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {
|
|
18
18
|
if (typeof window === 'undefined') {
|
|
19
19
|
return false;
|
|
@@ -2962,20 +2962,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2962
2962
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2963
2963
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2964
2964
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2965
|
-
|
|
2966
|
-
let isGoogleCal = false;
|
|
2965
|
+
let isGoogleCalId = false;
|
|
2967
2966
|
const newFileUrl = (function () {
|
|
2968
|
-
if (
|
|
2969
|
-
|
|
2967
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2968
|
+
isGoogleCalId = true;
|
|
2970
2969
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2971
2970
|
}
|
|
2972
2971
|
return encodeURIComponent(fileUrl);
|
|
2973
2972
|
})();
|
|
2974
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2973
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2975
2974
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2976
2975
|
return;
|
|
2977
2976
|
}
|
|
2978
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2977
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2979
2978
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2980
2979
|
return;
|
|
2981
2980
|
}
|
|
@@ -2996,7 +2995,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2996
2995
|
}
|
|
2997
2996
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2998
2997
|
const urlParts = [];
|
|
2999
|
-
|
|
2998
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2999
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
3000
|
+
} else {
|
|
3001
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
3002
|
+
}
|
|
3000
3003
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
3001
3004
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
3002
3005
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
|
@@ -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.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {
|
|
18
18
|
if (typeof window === 'undefined') {
|
|
19
19
|
return false;
|
|
@@ -2242,20 +2242,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2242
2242
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2243
2243
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2244
2244
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2245
|
-
|
|
2246
|
-
let isGoogleCal = false;
|
|
2245
|
+
let isGoogleCalId = false;
|
|
2247
2246
|
const newFileUrl = (function () {
|
|
2248
|
-
if (
|
|
2249
|
-
|
|
2247
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2248
|
+
isGoogleCalId = true;
|
|
2250
2249
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2251
2250
|
}
|
|
2252
2251
|
return encodeURIComponent(fileUrl);
|
|
2253
2252
|
})();
|
|
2254
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2253
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2255
2254
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2256
2255
|
return;
|
|
2257
2256
|
}
|
|
2258
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2257
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2259
2258
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2260
2259
|
return;
|
|
2261
2260
|
}
|
|
@@ -2276,7 +2275,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2276
2275
|
}
|
|
2277
2276
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2278
2277
|
const urlParts = [];
|
|
2279
|
-
|
|
2278
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2279
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
2280
|
+
} else {
|
|
2281
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
2282
|
+
}
|
|
2280
2283
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
2281
2284
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
2282
2285
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
|
@@ -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.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {};
|
|
18
18
|
const atcbIsBrowser = () => {
|
|
19
19
|
if (typeof window === 'undefined') {
|
|
@@ -2243,20 +2243,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2243
2243
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2244
2244
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2245
2245
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2246
|
-
|
|
2247
|
-
let isGoogleCal = false;
|
|
2246
|
+
let isGoogleCalId = false;
|
|
2248
2247
|
const newFileUrl = (function () {
|
|
2249
|
-
if (
|
|
2250
|
-
|
|
2248
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2249
|
+
isGoogleCalId = true;
|
|
2251
2250
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2252
2251
|
}
|
|
2253
2252
|
return encodeURIComponent(fileUrl);
|
|
2254
2253
|
})();
|
|
2255
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2254
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2256
2255
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2257
2256
|
return;
|
|
2258
2257
|
}
|
|
2259
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2258
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2260
2259
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2261
2260
|
return;
|
|
2262
2261
|
}
|
|
@@ -2277,7 +2276,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2277
2276
|
}
|
|
2278
2277
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2279
2278
|
const urlParts = [];
|
|
2280
|
-
|
|
2279
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
2280
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
2281
|
+
} else {
|
|
2282
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
2283
|
+
}
|
|
2281
2284
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
2282
2285
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
2283
2286
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
|
@@ -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.8.
|
|
9
|
+
* Version: 2.8.5
|
|
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.8.
|
|
16
|
+
const atcbVersion = '2.8.5';
|
|
17
17
|
const atcbCssTemplate = {};
|
|
18
18
|
const atcbIsBrowser = () => {
|
|
19
19
|
if (typeof window === 'undefined') {
|
|
@@ -2963,20 +2963,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
|
|
|
2963
2963
|
function atcb_subscribe_google(data, fileUrl) {
|
|
2964
2964
|
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
|
|
2965
2965
|
const baseUrlApp = 'calendar.google.com/calendar?cid=';
|
|
2966
|
-
|
|
2967
|
-
let isGoogleCal = false;
|
|
2966
|
+
let isGoogleCalId = false;
|
|
2968
2967
|
const newFileUrl = (function () {
|
|
2969
|
-
if (
|
|
2970
|
-
|
|
2968
|
+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
|
|
2969
|
+
isGoogleCalId = true;
|
|
2971
2970
|
return fileUrl.replace(/^(.)*\?cid=/, '');
|
|
2972
2971
|
}
|
|
2973
2972
|
return encodeURIComponent(fileUrl);
|
|
2974
2973
|
})();
|
|
2975
|
-
if ((atcbIsAndroid() || data.fakeAndroid) &&
|
|
2974
|
+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
|
|
2976
2975
|
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
|
|
2977
2976
|
return;
|
|
2978
2977
|
}
|
|
2979
|
-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) &&
|
|
2978
|
+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
|
|
2980
2979
|
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
|
|
2981
2980
|
return;
|
|
2982
2981
|
}
|
|
@@ -2997,7 +2996,11 @@ function atcb_subscribe_microsoft(data, fileUrl, calName, type = 'ms365') {
|
|
|
2997
2996
|
}
|
|
2998
2997
|
function atcb_generate_google(data, date, subEvent = 'all') {
|
|
2999
2998
|
const urlParts = [];
|
|
3000
|
-
|
|
2999
|
+
if (atcbIsMobile() || data.fakeMobile) {
|
|
3000
|
+
urlParts.push('https://calendar.google.com/calendar/render?action=TEMPLATE&');
|
|
3001
|
+
} else {
|
|
3002
|
+
urlParts.push('https://calendar.google.com/calendar/r/eventedit?');
|
|
3003
|
+
}
|
|
3001
3004
|
const formattedDate = atcb_generate_time(date, 'clean', 'google');
|
|
3002
3005
|
urlParts.push('dates=' + encodeURIComponent(formattedDate.start) + '%2F' + encodeURIComponent(formattedDate.end));
|
|
3003
3006
|
if (date.timeZone && date.timeZone !== '' && !/GMT[+|-]\d{1,2}|Etc\/U|Etc\/Zulu|CET|CST6CDT|EET|EST|MET|MST|PST8PDT|WET/i.test(date.timeZone) && !formattedDate.allday) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-to-calendar-button",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.17.0",
|
|
6
6
|
"npm": ">=9.6.7"
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@open-wc/testing": "^4.0.0",
|
|
104
104
|
"@web/test-runner": "^0.20.0",
|
|
105
105
|
"eslint": "^9.21.0",
|
|
106
|
-
"eslint-config-prettier": "^10.0.
|
|
106
|
+
"eslint-config-prettier": "^10.0.2",
|
|
107
107
|
"eslint-plugin-prettier": "^5.2.3",
|
|
108
108
|
"eslint-plugin-regexp": "^2.7.0",
|
|
109
109
|
"eslint-plugin-security": "^3.0.1",
|