diff options
author | bidouilles <lbergeret@gmail.com> | 2021-01-05 22:58:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 22:58:08 +0100 |
commit | 65ceeaff903719eb740413da48309301e505fb98 (patch) | |
tree | 01f9206e95c0f6c8baca5a18d628b3fccd3c2ec9 /recipes/infomaniak-mail/webview.js | |
parent | Update WhatsApp recipe to capture more unread message counters (#377) (diff) | |
download | ferdium-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/webview.js')
-rw-r--r-- | recipes/infomaniak-mail/webview.js | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ | |||
1 | module.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 | ||