From 23efe145fef3ea3a65344e46880a1f3e468f8e8a Mon Sep 17 00:00:00 2001 From: Ian Sealy Date: Tue, 10 Nov 2020 22:16:07 +0000 Subject: Add recipe for Fleep (https://fleep.io/). --- recipes/fleep/webview.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 recipes/fleep/webview.js (limited to 'recipes/fleep/webview.js') 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 @@ +"use strict"; + +var _path = _interopRequireDefault(require("path")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = Ferdi => { + const getMessages = function getMessages() { + // Count number of conversations or teams with unread messages + let count = document.querySelectorAll(".unread-count").length; + Ferdi.setBadge(count, 0); + }; + + Ferdi.loop(getMessages); + Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); +}; -- cgit v1.2.3-70-g09d2