diff options
Diffstat (limited to 'recipes/fastmail/webview.js')
-rw-r--r-- | recipes/fastmail/webview.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/recipes/fastmail/webview.js b/recipes/fastmail/webview.js index 42883e8..782963b 100644 --- a/recipes/fastmail/webview.js +++ b/recipes/fastmail/webview.js | |||
@@ -1,14 +1,18 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
4 | 6 | ||
5 | module.exports = (Ferdi) => { | 7 | module.exports = Ferdi => { |
6 | const getMessages = () => { | 8 | const getMessages = () => { |
7 | const inbox = document.querySelector('.v-MailboxSource--inbox .v-MailboxSource-badge'); | 9 | const inbox = document.querySelector( |
10 | '.v-MailboxSource--inbox .v-MailboxSource-badge', | ||
11 | ); | ||
8 | if (!inbox) { | 12 | if (!inbox) { |
9 | return; | 13 | return; |
10 | } | 14 | } |
11 | const messages = Ferdi.safeParseInt(inbox.innerText); | 15 | const messages = Ferdi.safeParseInt(inbox.textContent); |
12 | Ferdi.setBadge(messages); | 16 | Ferdi.setBadge(messages); |
13 | }; | 17 | }; |
14 | 18 | ||