aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/yandex-mail/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/yandex-mail/webview.js')
-rw-r--r--recipes/yandex-mail/webview.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/recipes/yandex-mail/webview.js b/recipes/yandex-mail/webview.js
index 66b82a7..b5a5156 100644
--- a/recipes/yandex-mail/webview.js
+++ b/recipes/yandex-mail/webview.js
@@ -1,10 +1,7 @@
1module.exports = Ferdium => { 1module.exports = Ferdium => {
2 const getMessages = () => { 2 const getMessages = () => {
3 let count = 0; 3 const button = document.querySelectorAll('[href="#unread"]')[0] ?? {};
4 4 const count = Ferdium.safeParseInt(button.textContent);
5 if (document.querySelectorAll('.mail-LabelList-Item_count').length > 1) {
6 count = Ferdium.safeParseInt(document.querySelectorAll('.mail-LabelList-Item_count')[1].textContent);
7 }
8 5
9 Ferdium.setBadge(count); 6 Ferdium.setBadge(count);
10 }; 7 };