aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/proton-mail
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/proton-mail
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-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')
-rw-r--r--recipes/proton-mail/webview.js26
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 @@
1module.exports = Franz => { 1module.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};