aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/zimbra/webview.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-12-20 19:22:21 +0100
committerLibravatar vantezzen <hello@vantezzen.io>2019-12-20 19:22:21 +0100
commita54d5cfa8564ee77f1a08972edb1f4bdfe4248a4 (patch)
treefb19d5c6cb80005059b456e4ba7ce4710f388b5f /uncompressed/zimbra/webview.js
parent#15 Add mastodon recipe (diff)
parentAdd Zimbra recipe (diff)
downloadferdium-recipes-a54d5cfa8564ee77f1a08972edb1f4bdfe4248a4.tar.gz
ferdium-recipes-a54d5cfa8564ee77f1a08972edb1f4bdfe4248a4.tar.zst
ferdium-recipes-a54d5cfa8564ee77f1a08972edb1f4bdfe4248a4.zip
Merge branch 'master' of https://github.com/getferdi/recipes
Diffstat (limited to 'uncompressed/zimbra/webview.js')
-rw-r--r--uncompressed/zimbra/webview.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/uncompressed/zimbra/webview.js b/uncompressed/zimbra/webview.js
new file mode 100644
index 0000000..aaaa952
--- /dev/null
+++ b/uncompressed/zimbra/webview.js
@@ -0,0 +1,18 @@
1"use strict";
2
3module.exports = Franz => {
4 const getMessages = function getMessages() {
5 const { title } = document;
6 const regex = /\d+/;
7
8 if (regex.test(title)) {
9 Franz.setBadge(
10 Number(regex.exec(title)[0])
11 );
12 } else {
13 Franz.setBadge(0);
14 }
15 };
16
17 Franz.loop(getMessages);
18}; \ No newline at end of file