diff options
Diffstat (limited to 'recipes/yandex-mail')
-rw-r--r-- | recipes/yandex-mail/package.json | 2 | ||||
-rw-r--r-- | recipes/yandex-mail/webview.js | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/recipes/yandex-mail/package.json b/recipes/yandex-mail/package.json index f2f4df3..88cb4e6 100644 --- a/recipes/yandex-mail/package.json +++ b/recipes/yandex-mail/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "yandex-mail", | 2 | "id": "yandex-mail", |
3 | "name": "Yandex Mail", | 3 | "name": "Yandex Mail", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://mail.yandex.ru" | 7 | "serviceURL": "https://mail.yandex.ru" |
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 @@ | |||
1 | module.exports = Ferdium => { | 1 | module.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 | }; |