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/slite | |
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/slite')
-rw-r--r-- | recipes/slite/webview.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/recipes/slite/webview.js b/recipes/slite/webview.js index d54b2d3..f1d9f32 100644 --- a/recipes/slite/webview.js +++ b/recipes/slite/webview.js | |||
@@ -1,7 +1,9 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const element = document.querySelector("#app button[data-test-id='notificationsCount']"); | 3 | const element = document.querySelector( |
4 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.innerText) : 0); | 4 | "#app button[data-test-id='notificationsCount']", |
5 | ); | ||
6 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.textContent) : 0); | ||
5 | }; | 7 | }; |
6 | 8 | ||
7 | Ferdi.loop(getMessages); | 9 | Ferdi.loop(getMessages); |