aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/whatsapp/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/whatsapp/webview.js')
-rw-r--r--recipes/whatsapp/webview.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js
index eaaf2c2..3df34e3 100644
--- a/recipes/whatsapp/webview.js
+++ b/recipes/whatsapp/webview.js
@@ -12,7 +12,8 @@ module.exports = Ferdi => {
12 let count = 0; 12 let count = 0;
13 let indirectCount = 0; 13 let indirectCount = 0;
14 14
15 const parentChatElem = document.querySelector('[aria-label="Chat list"]'); 15 const parentChatElem = Array.from(document.querySelectorAll('div[aria-label]'))
16 .sort((a, b) => (a.offsetHeight < b.offsetHeight) ? 1 : -1)[0];
16 if (!parentChatElem) { 17 if (!parentChatElem) {
17 return; 18 return;
18 } 19 }