aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linkedin/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linkedin/webview.js')
-rw-r--r--recipes/linkedin/webview.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/recipes/linkedin/webview.js b/recipes/linkedin/webview.js
index 8d1afc8..ae392f5 100644
--- a/recipes/linkedin/webview.js
+++ b/recipes/linkedin/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