From 155c4b832281348c16be1f4ef667e6e23dbf1bd8 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Fri, 27 Aug 2021 18:13:24 +0530 Subject: chore: normalized all recipes to ensure compatibility with es6 (#639) - Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm. --- recipes/clubhouse/package.json | 2 +- recipes/clubhouse/webview.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'recipes/clubhouse') diff --git a/recipes/clubhouse/package.json b/recipes/clubhouse/package.json index 847ffcc..1fe2000 100644 --- a/recipes/clubhouse/package.json +++ b/recipes/clubhouse/package.json @@ -1,7 +1,7 @@ { "id": "clubhouse", "name": "Clubhouse", - "version": "1.0.3", + "version": "1.1.0", "license": "MIT", "repository": "https://github.com/dnlnrs/ferdi-recipe-clubhouse", "config": { diff --git a/recipes/clubhouse/webview.js b/recipes/clubhouse/webview.js index 9b2b782..be02ac0 100644 --- a/recipes/clubhouse/webview.js +++ b/recipes/clubhouse/webview.js @@ -1,9 +1,7 @@ module.exports = (Ferdi) => { function getMessages() { const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible'); - if (hasNotifications) { - Ferdi.setBadge(0, 1); - } + Ferdi.setBadge(0, hasNotifications ? 1 : 0); } Ferdi.loop(getMessages); -- cgit v1.2.3-54-g00ecf