diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-10-05 17:04:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 17:04:09 +0200 |
commit | d3841b766f9d37d557646003899f67525c5f755f (patch) | |
tree | 1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/webex-teams/webview.js | |
parent | chore: repo maintenance (#732) (diff) | |
download | ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip |
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/webex-teams/webview.js')
-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); |