diff options
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 | }; | ||