Skip to content

Commit

Permalink
test fixing MS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jekuer committed May 10, 2023
1 parent 5490e8b commit 0f8ddbd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/atcb-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ function atcb_generate_links(host, type, data, subEvent = 'all', keyboardTrigger
linkType = 'ical';
}
// TMP WORKAROUND: redirect to iCal solution on mobile devices for msteams, ms365, and outlookcom, since the Microsoft web apps are buggy on mobile devices (see https://github.com/add2cal/add-to-calendar-button/discussions/113)
if (isMobile() && (type == 'msteams' || type == 'ms365' || type == 'outlookcom')) {
/*if (isMobile() && (type == 'msteams' || type == 'ms365' || type == 'outlookcom')) {
linkType = 'ical';
}
}*/
// adjust for subEvent and case
if (subEvent != 'all') {
subEvent = parseInt(subEvent) - 1;
Expand Down Expand Up @@ -308,7 +308,7 @@ function atcb_generate_yahoo(data) {
// See specs at: TODO: add some documentation here, if it exists
function atcb_generate_microsoft(data, type = '365') {
const urlParts = [];
const basePath = '/calendar/0/deeplink/compose?path=%2Fcalendar%2Faction%2Fcompose&rru=addevent';
const basePath = '/calendar/0/deeplink/compose?path=%252Fcalendar%252Faction%252Fcompose&rru=addevent';
const baseUrl = (function () {
if (type == 'outlook') {
return 'https://outlook.live.com' + basePath;
Expand All @@ -319,8 +319,8 @@ function atcb_generate_microsoft(data, type = '365') {
urlParts.push(baseUrl);
// generate and add date
const formattedDate = atcb_generate_time(data, 'delimiters', 'microsoft');
urlParts.push('startdt=' + encodeURIComponent(formattedDate.start));
urlParts.push('enddt=' + encodeURIComponent(formattedDate.end));
urlParts.push('startdt=' + formattedDate.start);
urlParts.push('enddt=' + formattedDate.end);
if (formattedDate.allday) {
urlParts.push('allday=true');
}
Expand Down

0 comments on commit 0f8ddbd

Please sign in to comment.