diff options
Diffstat (limited to 'recipes/webex-teams')
-rw-r--r-- | recipes/webex-teams/webview.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/recipes/webex-teams/webview.js b/recipes/webex-teams/webview.js index d29bed9..8a748e8 100644 --- a/recipes/webex-teams/webview.js +++ b/recipes/webex-teams/webview.js | |||
@@ -1,15 +1,17 @@ | |||
1 | module.exports = (Ferdi) => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | let count = 0; | 3 | let count = 0; |
4 | 4 | ||
5 | let span = document.getElementsByClassName('navigation-list-item--badgeCount'); | 5 | let span = document.querySelectorAll('.navigation-list-item--badgeCount'); |
6 | 6 | ||
7 | if (span.length == 0) { | 7 | if (span.length === 0) { |
8 | span = document.getElementsByClassName('navigation-list-item--badgeCount-minimized'); | 8 | span = document.querySelectorAll( |
9 | '.navigation-list-item--badgeCount-minimized', | ||
10 | ); | ||
9 | } | 11 | } |
10 | 12 | ||
11 | if (span.length > 0) { | 13 | if (span.length > 0) { |
12 | count = Ferdi.safeParseInt(span[0].innerText); | 14 | count = Ferdi.safeParseInt(span[0].textContent); |
13 | } | 15 | } |
14 | 16 | ||
15 | Ferdi.setBadge(count); | 17 | Ferdi.setBadge(count); |