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/producthunt/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/producthunt/webview.js')
-rw-r--r-- | recipes/producthunt/webview.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/recipes/producthunt/webview.js b/recipes/producthunt/webview.js index c03de9b..7f6c74b 100644 --- a/recipes/producthunt/webview.js +++ b/recipes/producthunt/webview.js | |||
@@ -1,7 +1,13 @@ | |||
1 | module.exports = (Ferdi) => { | 1 | module.exports = Ferdi => { |
2 | const notificationsSelector = document.querySelector( | ||
3 | '[class*=header_] [class*=content_] [class*=actions_] [class*=notificationsButton_]', | ||
4 | ); | ||
5 | |||
2 | const getMessages = () => { | 6 | const getMessages = () => { |
3 | Ferdi.setBadge(document.querySelector('[class*=header_] [class*=content_] [class*=actions_] [class*=notificationsButton_]').innerText) | 7 | if (notificationsSelector) { |
4 | } | 8 | Ferdi.setBadge(notificationsSelector.textContent); |
9 | } | ||
10 | }; | ||
5 | 11 | ||
6 | Ferdi.loop(getMessages) | 12 | Ferdi.loop(getMessages); |
7 | } | 13 | }; |