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/teamwork-projects/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/teamwork-projects/webview.js')
-rw-r--r-- | recipes/teamwork-projects/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/teamwork-projects/webview.js b/recipes/teamwork-projects/webview.js index aa3e7be..7d3e845 100644 --- a/recipes/teamwork-projects/webview.js +++ b/recipes/teamwork-projects/webview.js | |||
@@ -1,14 +1,14 @@ | |||
1 | module.exports = (Ferdi) => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | let indirectCount = 0; | 3 | let indirectCount = 0; |
4 | const badge = document.getElementById('numNotifs2'); | 4 | const badge = document.querySelector('#numNotifs2'); |
5 | 5 | ||
6 | if (badge && badge.innerText) { | 6 | if (badge && badge.textContent) { |
7 | indirectCount = Ferdi.safeParseInt(badge.innerText); | 7 | indirectCount = Ferdi.safeParseInt(badge.textContent); |
8 | } | 8 | } |
9 | 9 | ||
10 | Ferdi.setBadge(0, indirectCount); | 10 | Ferdi.setBadge(0, indirectCount); |
11 | } | 11 | }; |
12 | 12 | ||
13 | Ferdi.loop(getMessages); | 13 | Ferdi.loop(getMessages); |
14 | }; | 14 | }; |