From d3841b766f9d37d557646003899f67525c5f755f Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 5 Oct 2021 17:04:09 +0200 Subject: chore: add eslint-plugin-unicorn (#733) --- recipes/riseup/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/riseup/webview.js') diff --git a/recipes/riseup/webview.js b/recipes/riseup/webview.js index 0fb21f8..b3a78cf 100644 --- a/recipes/riseup/webview.js +++ b/recipes/riseup/webview.js @@ -1,9 +1,9 @@ module.exports = Ferdi => { const getMessages = () => { let unread = 0; - const notificationBadge = document.getElementsByClassName('unreadcount')[0]; + const notificationBadge = document.querySelectorAll('.unreadcount')[0]; if (notificationBadge != undefined) { - unread = Ferdi.safeParseInt(notificationBadge.innerText); + unread = Ferdi.safeParseInt(notificationBadge.textContent); } Ferdi.setBadge(unread); }; -- cgit v1.2.3-70-g09d2