diff options
author | André Oliveira <oliveira.andrerodrigues95@gmail.com> | 2022-09-21 10:28:36 +0100 |
---|---|---|
committer | André Oliveira <oliveira.andrerodrigues95@gmail.com> | 2022-09-21 10:28:36 +0100 |
commit | b14a52dbbe81371a83786cbf73396d519ce27d1a (patch) | |
tree | ef9135a065aad9d5c711531bd0b30071cc30ccc5 /recipes/messenger/webview.js | |
parent | Updated Messenger's notification detection based on "white_rqbbit"'s findings... (diff) | |
download | ferdium-recipes-b14a52dbbe81371a83786cbf73396d519ce27d1a.tar.gz ferdium-recipes-b14a52dbbe81371a83786cbf73396d519ce27d1a.tar.zst ferdium-recipes-b14a52dbbe81371a83786cbf73396d519ce27d1a.zip |
Fix for 39c3f6 failing build
Diffstat (limited to 'recipes/messenger/webview.js')
-rw-r--r-- | recipes/messenger/webview.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/recipes/messenger/webview.js b/recipes/messenger/webview.js index ef9e324..f7bc85b 100644 --- a/recipes/messenger/webview.js +++ b/recipes/messenger/webview.js | |||
@@ -1,7 +1,10 @@ | |||
1 | function hideInstallMessage() { | 1 | function hideInstallMessage() { |
2 | const installMessage = document.querySelector('.usczdcwk'); | 2 | const installMessage = document.querySelector('.usczdcwk'); |
3 | if (installMessage) { | 3 | if (installMessage) { |
4 | installMessage.style.display = installMessage.style.display != 'none' ? 'none': installMessage.style.display; | 4 | installMessage.style.display = |
5 | installMessage.style.display != 'none' | ||
6 | ? 'none' | ||
7 | : installMessage.style.display; | ||
5 | } | 8 | } |
6 | } | 9 | } |
7 | 10 | ||
@@ -16,9 +19,11 @@ module.exports = Ferdium => { | |||
16 | }) | 19 | }) |
17 | .reduce((prev, curr) => prev + curr, 0);*/ | 20 | .reduce((prev, curr) => prev + curr, 0);*/ |
18 | let count = 0; | 21 | let count = 0; |
19 | document.querySelectorAll('[data-testid="mwthreadlist-item"]').forEach((node) => { | 22 | for (const node of document.querySelectorAll( |
23 | '[data-testid="mwthreadlist-item"]', | ||
24 | )) { | ||
20 | if (node.querySelector('.lrazzd5p, .is6700om, .o48pnaf2')) count += 1; | 25 | if (node.querySelector('.lrazzd5p, .is6700om, .o48pnaf2')) count += 1; |
21 | }); | 26 | } |
22 | 27 | ||
23 | /* | 28 | /* |
24 | * add count of message requests on top of notification counter | 29 | * add count of message requests on top of notification counter |
@@ -32,8 +37,8 @@ module.exports = Ferdium => { | |||
32 | }; | 37 | }; |
33 | 38 | ||
34 | const loopRoutine = () => { | 39 | const loopRoutine = () => { |
35 | getMessages() | 40 | getMessages(); |
36 | hideInstallMessage() | 41 | hideInstallMessage(); |
37 | }; | 42 | }; |
38 | 43 | ||
39 | Ferdium.loop(loopRoutine); | 44 | Ferdium.loop(loopRoutine); |