diff options
author | 2019-12-20 19:22:21 +0100 | |
---|---|---|
committer | 2019-12-20 19:22:21 +0100 | |
commit | a54d5cfa8564ee77f1a08972edb1f4bdfe4248a4 (patch) | |
tree | fb19d5c6cb80005059b456e4ba7ce4710f388b5f /uncompressed/nextcloud-talk/webview.js | |
parent | #15 Add mastodon recipe (diff) | |
parent | Add Zimbra recipe (diff) | |
download | ferdium-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/nextcloud-talk/webview.js')
-rw-r--r-- | uncompressed/nextcloud-talk/webview.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/uncompressed/nextcloud-talk/webview.js b/uncompressed/nextcloud-talk/webview.js new file mode 100644 index 0000000..ae055f0 --- /dev/null +++ b/uncompressed/nextcloud-talk/webview.js | |||
@@ -0,0 +1,16 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | var _path = _interopRequireDefault(require("path")); | ||
4 | |||
5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
6 | |||
7 | module.exports = Franz => { | ||
8 | const getMessages = function getMessages() { | ||
9 | const direct = document.querySelectorAll('.app-navigation-entry-utils-counter.highlighted').length; | ||
10 | const indirect = document.querySelectorAll('.app-navigation-entry-utils-counter:not(.highlighted)').length; | ||
11 | Franz.setBadge(direct, indirect); | ||
12 | }; | ||
13 | |||
14 | Franz.loop(getMessages); | ||
15 | Franz.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
16 | }; \ No newline at end of file | ||