aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/infomaniak-mail
diff options
context:
space:
mode:
authorLibravatar bidouilles <lbergeret@gmail.com>2021-01-05 22:58:08 +0100
committerLibravatar GitHub <noreply@github.com>2021-01-05 22:58:08 +0100
commit65ceeaff903719eb740413da48309301e505fb98 (patch)
tree01f9206e95c0f6c8baca5a18d628b3fccd3c2ec9 /recipes/infomaniak-mail
parentUpdate WhatsApp recipe to capture more unread message counters (#377) (diff)
downloadferdium-recipes-65ceeaff903719eb740413da48309301e505fb98.tar.gz
ferdium-recipes-65ceeaff903719eb740413da48309301e505fb98.tar.zst
ferdium-recipes-65ceeaff903719eb740413da48309301e505fb98.zip
Add recipe for Infomaniak Mail (#373)
Diffstat (limited to 'recipes/infomaniak-mail')
-rw-r--r--recipes/infomaniak-mail/README.md2
-rw-r--r--recipes/infomaniak-mail/icon.pngbin0 -> 28470 bytes
-rw-r--r--recipes/infomaniak-mail/icon.svg17
-rw-r--r--recipes/infomaniak-mail/index.js2
-rw-r--r--recipes/infomaniak-mail/package.json24
-rw-r--r--recipes/infomaniak-mail/webview.js7
6 files changed, 52 insertions, 0 deletions
diff --git a/recipes/infomaniak-mail/README.md b/recipes/infomaniak-mail/README.md
new file mode 100644
index 0000000..8a41268
--- /dev/null
+++ b/recipes/infomaniak-mail/README.md
@@ -0,0 +1,2 @@
1# Infomaniak Mail for Ferdi
2This is a Ferdi recipe for Infomaniak Mail
diff --git a/recipes/infomaniak-mail/icon.png b/recipes/infomaniak-mail/icon.png
new file mode 100644
index 0000000..4ae6c8e
--- /dev/null
+++ b/recipes/infomaniak-mail/icon.png
Binary files differ
diff --git a/recipes/infomaniak-mail/icon.svg b/recipes/infomaniak-mail/icon.svg
new file mode 100644
index 0000000..13f2863
--- /dev/null
+++ b/recipes/infomaniak-mail/icon.svg
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<svg width="512px" height="512px" viewBox="0 0 38 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3 <title>Mail (1)</title>
4 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5 <g id="Mail-(1)">
6 <path d="M13.2875147,0.840602789 L36.5097369,7.98590204 C37.3955415,8.25845729 38.0000001,9.0768697 38.0000001,10.0036577 L38.0000001,29.8638638 C38.0000001,31.0297983 37.0548235,31.9749749 35.888889,31.9749749 C35.6784434,31.9749749 35.4691806,31.9435086 35.2680411,31.8816195 L12.0458189,24.7363207 C11.1600144,24.4637655 10.5555557,23.645353 10.5555557,22.718565 L10.5555557,2.85835847 C10.5555557,1.692424 11.5007323,0.74724736 12.6666668,0.74724736 C12.8771124,0.74724736 13.0863752,0.778713715 13.2875147,0.840602789 Z" id="Rectangle-Copy-15" fill="#FF9ABF" fill-rule="nonzero" opacity="0.5"></path>
7 <path d="M8.00973686,4.21838052 L31.2319591,11.3636798 C32.1177636,11.636235 32.7222223,12.4546474 32.7222223,13.3814355 L32.7222223,33.2416415 C32.7222223,34.407576 31.7770456,35.3527526 30.6111112,35.3527526 C30.4006656,35.3527526 30.1914028,35.3212863 29.9902633,35.2593972 L6.76804108,28.1140984 C5.88223652,27.8415432 5.27777784,27.0231308 5.27777784,26.0963427 L5.27777784,6.2361362 C5.27777784,5.07020173 6.22295448,4.12502509 7.38888895,4.12502509 C7.59933455,4.12502509 7.80859738,4.15649145 8.00973686,4.21838052 Z" id="Rectangle-Copy-10" fill="#F789B2" fill-rule="nonzero" opacity="0.8"></path>
8 <g id="path-1" transform="translate(0.000000, 8.000000)" fill="#FF5B97" fill-rule="nonzero">
9 <path d="M2.73195902,0.44060279 L25.9541812,7.585902 C26.8399858,7.8584573 27.4444444,8.6768697 27.4444444,9.6036577 L27.4444444,29.4638638 C27.4444444,30.6297983 26.4992678,31.5749749 25.3333333,31.5749749 C25.1228877,31.5749749 24.9136249,31.5435086 24.7124855,31.4816195 L1.49026324,24.3363207 C0.604458679,24.0637655 0,23.245353 0,22.318565 L0,2.4583585 C0,1.292424 0.945176639,0.34724736 2.11111111,0.34724736 C2.32155671,0.34724736 2.53081954,0.37871372 2.73195902,0.44060279 Z"></path>
10 </g>
11 <g id="Rectangle-Copy-17-Clipped" transform="translate(0.000000, 7.000000)">
12 <path d="M2.73195902,1.44060279 L25.9541812,8.585902 C26.8399858,8.8584573 27.4444444,9.6768697 27.4444444,10.6036577 L27.4444444,30.4638638 C27.4444444,31.6297983 26.4992678,32.5749749 25.3333333,32.5749749 C25.1228877,32.5749749 24.9136249,32.5435086 24.7124855,32.4816195 L1.49026324,25.3363207 C0.604458679,25.0637655 0,24.245353 0,23.318565 L0,3.4583585 C0,2.292424 0.945176639,1.34724736 2.11111111,1.34724736 C2.32155671,1.34724736 2.53081954,1.37871372 2.73195902,1.44060279 Z" id="path-1"></path>
13 <path d="M0,0.6 L0.675727005,1.91029451 C1.05239802,1.56087698 1.55680663,1.34724736 2.11111111,1.34724736 C2.31913382,1.34724736 2.52600083,1.37799334 2.72500855,1.43847727 L2.717,1.436 L25.9654349,8.58939876 C26.3621865,8.71388234 26.7019136,8.94809217 26.9553467,9.25239818 L27.059,9.387 L13.6452431,21.3383719 C12.7746896,22.1139619 11.4402266,22.0369787 10.6646367,21.1664252 C10.5463832,21.0336926 10.4453683,20.8865553 10.3639903,20.7285064 L0,0.6 Z" id="Combined-Shape" fill="#E50322" fill-rule="nonzero" style="mix-blend-mode: multiply;"></path>
14 </g>
15 </g>
16 </g>
17</svg> \ No newline at end of file
diff --git a/recipes/infomaniak-mail/index.js b/recipes/infomaniak-mail/index.js
new file mode 100644
index 0000000..93f2dcf
--- /dev/null
+++ b/recipes/infomaniak-mail/index.js
@@ -0,0 +1,2 @@
1module.exports = Ferdi => class infomaniakmail extends Ferdi {
2};
diff --git a/recipes/infomaniak-mail/package.json b/recipes/infomaniak-mail/package.json
new file mode 100644
index 0000000..b9e0c71
--- /dev/null
+++ b/recipes/infomaniak-mail/package.json
@@ -0,0 +1,24 @@
1{
2 "id": "infomaniak-mail",
3 "name": "Infomaniak Mail",
4 "version": "1.0.0",
5 "description": "infomaniak-mail",
6 "main": "index.js",
7 "author": "Lionel <lionel@bergeret.email>",
8 "license": "MIT",
9 "config": {
10 "serviceURL": "https://mail.infomaniak.com/",
11 "serviceName": "infomaniak-mail",
12 "message": "",
13 "popup": [],
14 "hasNotificationSound": false,
15 "hasIndirectMessages": false,
16 "hasTeamID": false,
17 "customURL": false,
18 "hostedOnly": false,
19 "webviewOptions": {
20 "disablewebsecurity": ""
21 },
22 "openDevTools": false
23 }
24}
diff --git a/recipes/infomaniak-mail/webview.js b/recipes/infomaniak-mail/webview.js
new file mode 100644
index 0000000..71a022b
--- /dev/null
+++ b/recipes/infomaniak-mail/webview.js
@@ -0,0 +1,7 @@
1module.exports = Ferdi => {
2 function getMessages() {
3 const count = document.querySelector('.ws-tree-node-badge').innerText
4 Ferdi.setBadge(count ? Number(count.substring(1, count.length - 1)) : 0)
5 }
6 Ferdi.loop(getMessages)
7} \ No newline at end of file