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/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/proton-mail/webview.js') 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