aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linkedin
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-05 17:04:09 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-05 17:04:09 +0200
commitd3841b766f9d37d557646003899f67525c5f755f (patch)
tree1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/linkedin
parentchore: repo maintenance (#732) (diff)
downloadferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/linkedin')
-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