diff options
Diffstat (limited to 'recipes/simplenote')
-rw-r--r-- | recipes/simplenote/index.js | 3 | ||||
-rw-r--r-- | recipes/simplenote/webview.js | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/recipes/simplenote/index.js b/recipes/simplenote/index.js index 18db071..15ecf81 100644 --- a/recipes/simplenote/index.js +++ b/recipes/simplenote/index.js | |||
@@ -1,2 +1 @@ | |||
1 | module.exports = Ferdi => class simplenote extends Ferdi { | module.exports = Ferdi => class simplenote extends Ferdi {}; | |
2 | }; | ||
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 | ||