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/clickup/webview.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 recipes/clickup/webview.js (limited to 'recipes/clickup/webview.js') diff --git a/recipes/clickup/webview.js b/recipes/clickup/webview.js new file mode 100644 index 0000000..ef7a41e --- /dev/null +++ b/recipes/clickup/webview.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = Franz => { + const getMessages = function getMessages() { + const elements = document.querySelectorAll('.unreadCount'); + const unread = document.querySelector('.cu-notification-alert__dot'); + Franz.setBadge(unread ? 1 : 0); + }; + + Franz.loop(getMessages); +}; -- cgit v1.2.3-54-g00ecf