From 7517a409a1a502c747eb4598492a88cec4e8d58c Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 19 Sep 2021 07:26:25 +0530 Subject: fix: fix js error; styling --- recipes/proton-mail/package.json | 2 +- recipes/proton-mail/webview.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes/proton-mail') diff --git a/recipes/proton-mail/package.json b/recipes/proton-mail/package.json index 9cb0d99..ab09207 100644 --- a/recipes/proton-mail/package.json +++ b/recipes/proton-mail/package.json @@ -1,7 +1,7 @@ { "id": "proton-mail", "name": "ProtonMail", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "config": { "serviceURL": "https://mail.protonmail.com/login" diff --git a/recipes/proton-mail/webview.js b/recipes/proton-mail/webview.js index 10319f2..ed66db5 100644 --- a/recipes/proton-mail/webview.js +++ b/recipes/proton-mail/webview.js @@ -1,11 +1,11 @@ module.exports = Ferdi => { - function getMessages() { + const getMessages = () => { const element = document.querySelector('.navigationItem-counter'); if (!element) { return; } const text = element.innerText; - const count = Number(text.substring(1, text.length - 1)); + const count = Ferdi.safeParseInt(text.substring(1, text.length - 1)); Ferdi.setBadge(count); } -- cgit v1.2.3-70-g09d2