diff options
author | 2020-10-29 11:52:18 +0200 | |
---|---|---|
committer | 2020-10-29 10:52:18 +0100 | |
commit | b7bfaff13d55e686ea65c89ba57c117703b5d4ca (patch) | |
tree | 817e00d6f4bfd14db7d47eab3ca478f8a6ddbd14 /recipes/nextcloud/webview.js | |
parent | Add recipe for Wire (#344) (diff) | |
download | ferdium-recipes-b7bfaff13d55e686ea65c89ba57c117703b5d4ca.tar.gz ferdium-recipes-b7bfaff13d55e686ea65c89ba57c117703b5d4ca.tar.zst ferdium-recipes-b7bfaff13d55e686ea65c89ba57c117703b5d4ca.zip |
Add recipe for Nextcloud (#343)
Diffstat (limited to 'recipes/nextcloud/webview.js')
-rw-r--r-- | recipes/nextcloud/webview.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes/nextcloud/webview.js b/recipes/nextcloud/webview.js new file mode 100644 index 0000000..b7589de --- /dev/null +++ b/recipes/nextcloud/webview.js | |||
@@ -0,0 +1,19 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | var _path = _interopRequireDefault(require("path")); | ||
4 | |||
5 | function _interopRequireDefault(obj) { | ||
6 | return obj && obj.__esModule ? obj : {default: obj}; | ||
7 | } | ||
8 | |||
9 | module.exports = Franz => { | ||
10 | const getMessages = function getMessages() { | ||
11 | const direct = document.querySelectorAll( | ||
12 | '.notifications .notification-container .notification-wrapper li .notification' | ||
13 | ).length; | ||
14 | |||
15 | Franz.setBadge(direct); | ||
16 | }; | ||
17 | |||
18 | Franz.loop(getMessages); | ||
19 | }; | ||