diff options
author | Ian Sealy <git@iansealy.com> | 2020-11-10 22:16:07 +0000 |
---|---|---|
committer | Ian Sealy <git@iansealy.com> | 2020-11-10 22:16:07 +0000 |
commit | 23efe145fef3ea3a65344e46880a1f3e468f8e8a (patch) | |
tree | 6a56823e1d6dc4e2f90cf2bebb2bf582d3f9a410 /recipes/fleep/webview.js | |
parent | Merge pull request #351 from tpapamichail/master (diff) | |
download | ferdium-recipes-23efe145fef3ea3a65344e46880a1f3e468f8e8a.tar.gz ferdium-recipes-23efe145fef3ea3a65344e46880a1f3e468f8e8a.tar.zst ferdium-recipes-23efe145fef3ea3a65344e46880a1f3e468f8e8a.zip |
Add recipe for Fleep (https://fleep.io/).
Diffstat (limited to 'recipes/fleep/webview.js')
-rw-r--r-- | recipes/fleep/webview.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes/fleep/webview.js b/recipes/fleep/webview.js new file mode 100644 index 0000000..f3d765d --- /dev/null +++ b/recipes/fleep/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 = Ferdi => { | ||
8 | const getMessages = function getMessages() { | ||
9 | // Count number of conversations or teams with unread messages | ||
10 | let count = document.querySelectorAll(".unread-count").length; | ||
11 | Ferdi.setBadge(count, 0); | ||
12 | }; | ||
13 | |||
14 | Ferdi.loop(getMessages); | ||
15 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
16 | }; | ||