diff options
author | 2021-10-05 17:04:09 +0200 | |
---|---|---|
committer | 2021-10-05 17:04:09 +0200 | |
commit | d3841b766f9d37d557646003899f67525c5f755f (patch) | |
tree | 1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/fastmail/webview.js | |
parent | chore: repo maintenance (#732) (diff) | |
download | ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip |
chore: add eslint-plugin-unicorn (#733)
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 | ||