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/intercom/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/intercom/webview.js')
-rw-r--r-- | recipes/intercom/webview.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/recipes/intercom/webview.js b/recipes/intercom/webview.js index 1ccf8a0..ff3e9a0 100644 --- a/recipes/intercom/webview.js +++ b/recipes/intercom/webview.js | |||
@@ -1,8 +1,12 @@ | |||
1 | module.exports = (Ferdi) => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const numMessages = Ferdi.safeParseInt(document.querySelector('.left-nav [data-content="Inbox"] .unread__container .unread').innerHTML); | 3 | const numMessages = Ferdi.safeParseInt( |
4 | document.querySelector( | ||
5 | '.left-nav [data-content="Inbox"] .unread__container .unread', | ||
6 | ).textContent, | ||
7 | ); | ||
4 | Ferdi.setBadge(numMessages); | 8 | Ferdi.setBadge(numMessages); |
5 | } | 9 | }; |
6 | 10 | ||
7 | Ferdi.loop(getMessages); | 11 | Ferdi.loop(getMessages); |
8 | }; | 12 | }; |