From 6f5e4a00588aefdda7a5a1cfe70935870e7e234a Mon Sep 17 00:00:00 2001 From: Bennett Date: Tue, 22 Sep 2020 20:56:48 +0200 Subject: Unpack recipes and update recipes icons (#292) Co-authored-by: Amine Mouafik --- recipes/zulip/webview.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 recipes/zulip/webview.js (limited to 'recipes/zulip/webview.js') diff --git a/recipes/zulip/webview.js b/recipes/zulip/webview.js new file mode 100644 index 0000000..fdf9551 --- /dev/null +++ b/recipes/zulip/webview.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = Franz => { + const getMessages = function getMessages() { + const allMessages = Math.round(document.querySelectorAll("#global_filters .top_left_all_messages .count .value")[0].innerText); + Franz.setBadge(allMessages); + }; + Franz.loop(getMessages); +}; -- cgit v1.2.3-70-g09d2