aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/ms-planner/index.js
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2024-03-18 12:36:05 +0000
committerLibravatar GitHub <noreply@github.com>2024-03-18 12:36:05 +0000
commit006950318f1228af10eeb0cdfb0861af6ecb1e75 (patch)
treed61c790d4a4b9f6f16620f645b2ba5dce248f79d /recipes/ms-planner/index.js
parentGoogle Voice darkmode update for add contact (#516) (diff)
downloadferdium-recipes-006950318f1228af10eeb0cdfb0861af6ecb1e75.tar.gz
ferdium-recipes-006950318f1228af10eeb0cdfb0861af6ecb1e75.tar.zst
ferdium-recipes-006950318f1228af10eeb0cdfb0861af6ecb1e75.zip
Add several recipes (#519)
The added recipes are as follows: - Mastodeck (fixes https://github.com/ferdium/ferdium-app/issues/959) - Microsoft Planner (fixes https://github.com/ferdium/ferdium-app/issues/955) - Alibaba Chat (fixes https://github.com/ferdium/ferdium-app/issues/1376) - Fiverr (step forward in https://github.com/ferdium/ferdium-app/issues/1377 - missing unread logic) - Draw.io (fixes https://github.com/ferdium/ferdium-app/issues/1429) - Canva (fixes https://github.com/ferdium/ferdium-app/issues/1447) - Penpot (fixes https://github.com/ferdium/ferdium-app/issues/1469) - HackerNews (fixes https://github.com/ferdium/ferdium-app/issues/1505) - Google Maps (fixes https://github.com/ferdium/ferdium-app/issues/1513) - Patreon (fixes https://github.com/ferdium/ferdium-app/issues/1524) - Fandom (fixes https://github.com/ferdium/ferdium-app/issues/1540) - Romeo (fixes https://github.com/ferdium/ferdium-app/issues/1553) - Infomaniak Kdrive (fixes https://github.com/ferdium/ferdium-app/issues/1559) - Notion Calendar (fixes https://github.com/ferdium/ferdium-app/issues/1599) - Superlist (fixes https://github.com/ferdium/ferdium-app/issues/1601) - Purelymail (fixes https://github.com/ferdium/ferdium-app/issues/1624) - SOGo (fixes https://github.com/ferdium/ferdium-app/issues/1472)
Diffstat (limited to 'recipes/ms-planner/index.js')
-rw-r--r--recipes/ms-planner/index.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/recipes/ms-planner/index.js b/recipes/ms-planner/index.js
new file mode 100644
index 0000000..cc0b44a
--- /dev/null
+++ b/recipes/ms-planner/index.js
@@ -0,0 +1,27 @@
1module.exports = Ferdium =>
2 class Planner extends Ferdium {
3 overrideUserAgent() {
4 return window.navigator.userAgent
5 .replace(/(Ferdium|Electron)(\S+\s)/g, '')
6 .replace(/(Chrome\/)([^ ]*)/g, '$163.0.3239.84');
7 }
8
9 // https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-sign-in/sign-in-loop#resolution
10 knownCertificateHosts() {
11 return ['tasks.office.com'];
12 }
13
14 // we need to allow all cookies for ms teams
15 onHeadersReceived(details, callback) {
16 if (
17 details.responseHeaders &&
18 details.responseHeaders['Set-Cookie'] &&
19 details.responseHeaders['Set-Cookie'].length > 0 &&
20 !details.responseHeaders['Set-Cookie'][0].includes('SameSite=none')
21 ) {
22 details.responseHeaders['Set-Cookie'][0] =
23 `${details.responseHeaders['Set-Cookie'][0]}; SameSite=none`;
24 }
25 callback({ cancel: false, responseHeaders: details.responseHeaders });
26 }
27 };