From fe47c792691e4fffbeae4a59b638eee0468a4d83 Mon Sep 17 00:00:00 2001 From: Slan Date: Wed, 13 Jul 2022 12:41:18 +0100 Subject: Error Handling on Office 365 landing page (#125) Updated Office365 trying to fetch xpath elements that dont exist yet --- recipes/office365-owa/package.json | 2 +- recipes/office365-owa/webview.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'recipes') diff --git a/recipes/office365-owa/package.json b/recipes/office365-owa/package.json index 0bb42fc..6cd10eb 100644 --- a/recipes/office365-owa/package.json +++ b/recipes/office365-owa/package.json @@ -1,7 +1,7 @@ { "id": "office365-owa", "name": "Office 365 Outlook", - "version": "1.6.1", + "version": "1.6.2", "license": "MIT", "aliases": [ "live.com", diff --git a/recipes/office365-owa/webview.js b/recipes/office365-owa/webview.js index 70790f0..9613636 100644 --- a/recipes/office365-owa/webview.js +++ b/recipes/office365-owa/webview.js @@ -18,12 +18,10 @@ module.exports = (Ferdium, settings) => { const getMessages = () => { let directUnreadCount = 0; let indirectUnreadCount = 0; - if (/\/owa/.test(location.pathname)) { // classic app directUnreadCount = Ferdium.safeParseInt( - document.querySelectorAll("span[title*='Inbox'] + div > span")[0] - .textContent, + document.querySelectorAll("span[title*='Inbox'] + div > span")[0]?.textContent ); } else { // new app @@ -37,6 +35,5 @@ module.exports = (Ferdium, settings) => { Ferdium.setBadge(directUnreadCount, indirectUnreadCount); }; - Ferdium.loop(getMessages); }; -- cgit v1.2.3-54-g00ecf