Skip to content

Commit 3a9e349

Browse files
authored
Merge pull request #676 from add2cal/dev
fixing google ics subscription
2 parents d273177 + f18d745 commit 3a9e349

23 files changed

+35
-36
lines changed

assets/css/atcb-3d.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: 3D
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-date.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Date
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-flat.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Flat
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-neumorphism.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Neumorphism
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-round.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Round
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-text.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Text
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Default
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

demo/components/footer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function topFunction() {
7070
</span>
7171
<div class="mt-6 text-xs sm:mt-5 md:mt-3">
7272
<span class="font-semibold text-zinc-500 dark:text-zinc-400"> &copy; {{new Date().getFullYear()}} </span>
73-
<span class="lowercase text-zinc-400 dark:text-zinc-500"> , Current Version: 2.8.4 </span>
73+
<span class="lowercase text-zinc-400 dark:text-zinc-500"> , Current Version: 2.8.5 </span>
7474
</div>
7575
</div>
7676
<div class="hidden self-center sm:block">

demo/public/atcb.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Default
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "add-to-calendar-button",
3-
"version": "2.8.4",
3+
"version": "2.8.5",
44
"engines": {
55
"node": ">=18.17.0",
66
"npm": ">=9.6.7"
@@ -103,7 +103,7 @@
103103
"@open-wc/testing": "^4.0.0",
104104
"@web/test-runner": "^0.20.0",
105105
"eslint": "^9.21.0",
106-
"eslint-config-prettier": "^10.0.1",
106+
"eslint-config-prettier": "^10.0.2",
107107
"eslint-plugin-prettier": "^5.2.3",
108108
"eslint-plugin-regexp": "^2.7.0",
109109
"eslint-plugin-security": "^3.0.1",

src/atcb-control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-decorate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-event.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-generate-pro.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-generate-rich-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-generate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-globals.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
* Add to Calendar Button
66
* ++++++++++++++++++++++
77
*
8-
* Version: 2.8.4
8+
* Version: 2.8.5
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
1212
* Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
1313
*
1414
*/
15-
const atcbVersion = '2.8.4';
15+
const atcbVersion = '2.8.5';
1616

1717
// DEFINING CSS
1818
const atcbCssTemplate = {};

src/atcb-i18n.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-links.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -221,20 +221,19 @@ function atcb_subscribe_ical(data, fileUrl, type, host = null, keyboardTrigger =
221221
function atcb_subscribe_google(data, fileUrl) {
222222
const baseUrl = 'https://calendar.google.com/calendar/u/0/r?cid=';
223223
const baseUrlApp = 'calendar.google.com/calendar?cid=';
224-
const fileUrlRegex = /^(?:webcal:\/\/|\/\/)calendar\.google\.com\//;
225-
let isGoogleCal = false;
224+
let isGoogleCalId = false;
226225
const newFileUrl = (function () {
227-
if (fileUrlRegex.test(fileUrl)) {
228-
isGoogleCal = true;
226+
if (/^(?:webcal:\/\/|\/\/)calendar\.google\.com\/.*\?cid=/.test(fileUrl)) {
227+
isGoogleCalId = true;
229228
return fileUrl.replace(/^(.)*\?cid=/, '');
230229
}
231230
return encodeURIComponent(fileUrl);
232231
})();
233-
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCal) {
232+
if ((atcbIsAndroid() || data.fakeAndroid) && isGoogleCalId) {
234233
atcb_open_cal_url(data, 'google', 'intent://' + baseUrlApp + newFileUrl + '#Intent;scheme=https;package=com.google.android.calendar;end', true);
235234
return;
236235
}
237-
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && fileUrlRegex.test(fileUrl)) {
236+
if (((atcbIsiOS() && atcbIsSafari()) || data.fakeIOS) && isGoogleCalId) {
238237
// since Apple is a little unstable here, we only go for the more or less safe cases
239238
atcb_open_cal_url(data, 'google', 'googlecalendar://' + baseUrlApp + newFileUrl, true);
240239
return;

src/atcb-util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

src/atcb-validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add to Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 2.8.4
6+
* Version: 2.8.5
77
* Creator: Jens Kuerschner (https://jekuer.com)
88
* Project: https://github.com/add2cal/add-to-calendar-button
99
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

0 commit comments

Comments
 (0)