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/simplenote/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/simplenote/webview.js')
-rw-r--r-- | recipes/simplenote/webview.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/recipes/simplenote/webview.js b/recipes/simplenote/webview.js index 8d1afc8..ae392f5 100644 --- a/recipes/simplenote/webview.js +++ b/recipes/simplenote/webview.js | |||
@@ -3,11 +3,15 @@ module.exports = Ferdi => { | |||
3 | let count = 0; | 3 | let count = 0; |
4 | 4 | ||
5 | if (window.location.pathname.includes('messaging')) { | 5 | if (window.location.pathname.includes('messaging')) { |
6 | count = document.querySelectorAll('.msg-conversation-card__unread-count').length; | 6 | count = document.querySelectorAll( |
7 | '.msg-conversation-card__unread-count', | ||
8 | ).length; | ||
7 | } else { | 9 | } else { |
8 | const element = document.querySelector('.nav-item--messaging .nav-item__badge-count'); | 10 | const element = document.querySelector( |
11 | '.nav-item--messaging .nav-item__badge-count', | ||
12 | ); | ||
9 | if (element) { | 13 | if (element) { |
10 | count = Ferdi.safeParseInt(element.innerHTML); | 14 | count = Ferdi.safeParseInt(element.textContent); |
11 | } | 15 | } |
12 | } | 16 | } |
13 | 17 | ||