From 804d22a06447b0a8ab6acab2aca7f02d939d2d62 Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Sat, 11 Sep 2021 23:12:08 +0530 Subject: fix issue with Office365 not getting unread counts in non-english locale (fixes #679) (#681) --- recipes/office365-owa/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/office365-owa/webview.js') diff --git a/recipes/office365-owa/webview.js b/recipes/office365-owa/webview.js index 1a04132..82c7dfd 100644 --- a/recipes/office365-owa/webview.js +++ b/recipes/office365-owa/webview.js @@ -12,7 +12,7 @@ module.exports = Ferdi => { if (foldersElement) { const allScreenReaders = foldersElement.querySelectorAll('span.screenReaderOnly'); for (const child of allScreenReaders) { - if ((child.innerText === 'unread' || child.innerText === 'item') && child.previousSibling) { + if (child.previousSibling) { directUnreadCount += Ferdi.safeParseInt(child.previousSibling.innerText); } } @@ -22,7 +22,7 @@ module.exports = Ferdi => { if (groupsElement) { const allScreenReaders = groupsElement.querySelectorAll('span.screenReaderOnly'); for (const child of allScreenReaders) { - if ((child.innerText === 'unread' || child.innerText === 'item') && child.previousSibling) { + if (child.previousSibling) { indirectUnreadCount += Ferdi.safeParseInt(child.previousSibling.innerText); } } -- cgit v1.2.3-70-g09d2