diff options
author | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/proton-mail/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/proton-mail/webview.js')
-rw-r--r-- | recipes/proton-mail/webview.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/recipes/proton-mail/webview.js b/recipes/proton-mail/webview.js index 3d8a30e..fd1a865 100644 --- a/recipes/proton-mail/webview.js +++ b/recipes/proton-mail/webview.js | |||
@@ -1,16 +1,16 @@ | |||
1 | module.exports = Franz => { | 1 | module.exports = Franz => { |
2 | function getMessages() { | 2 | function getMessages() { |
3 | const element = document.querySelector('.navigationItem-counter') | 3 | const element = document.querySelector('.navigationItem-counter'); |
4 | if (!element) { | 4 | if (!element) { |
5 | return | 5 | return; |
6 | } | ||
7 | const text = element.innerText | ||
8 | const count = Number(text.substring(1, text.length - 1)) | ||
9 | if (Number.isNaN(count)) { | ||
10 | return | ||
11 | } | ||
12 | Franz.setBadge(count) | ||
13 | } | 6 | } |
7 | const text = element.innerText; | ||
8 | const count = Number(text.substring(1, text.length - 1)); | ||
9 | if (Number.isNaN(count)) { | ||
10 | return; | ||
11 | } | ||
12 | Franz.setBadge(count); | ||
13 | } | ||
14 | 14 | ||
15 | Franz.loop(getMessages) | 15 | Franz.loop(getMessages); |
16 | } | 16 | }; |