From af07a06978d3cf99f876d0dc216faed4cc9c2fbe Mon Sep 17 00:00:00 2001 From: Niklas Neesen Date: Tue, 7 Jul 2020 09:35:57 +0200 Subject: Fixing unread-counter for office365 --- uncompressed/office365-owa/package.json | 2 +- uncompressed/office365-owa/webview.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'uncompressed') diff --git a/uncompressed/office365-owa/package.json b/uncompressed/office365-owa/package.json index c68f5d0..1ffb2ee 100644 --- a/uncompressed/office365-owa/package.json +++ b/uncompressed/office365-owa/package.json @@ -1,7 +1,7 @@ { "id": "office365-owa", "name": "Office 365 Outlook Web App", - "version": "1.1.0", + "version": "1.1.1", "description": "Office 365 Outlook Web App", "main": "index.js", "author": "Adam Birds ", diff --git a/uncompressed/office365-owa/webview.js b/uncompressed/office365-owa/webview.js index e144c46..ae21e19 100644 --- a/uncompressed/office365-owa/webview.js +++ b/uncompressed/office365-owa/webview.js @@ -3,7 +3,7 @@ module.exports = Franz => { const getMessages = function getMessages() { let unreadMail = 0; - + if (location.pathname.match(/\/owa/)) { // classic app unreadMail = parseInt( @@ -19,7 +19,7 @@ module.exports = Franz => { return; } - unreadMail = [...folders.parentNode.children].reduce((count, child) => { + unreadMail = [...folders.parentNode.parentNode.children].reduce((count, child) => { const unread = child.querySelector('.screenReaderOnly'); return unread && unread.textContent === 'unread' ? count + parseInt(unread.previousSibling.textContent, 10) -- cgit v1.2.3-70-g09d2