diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/office365-owa/package.json | 2 | ||||
-rw-r--r-- | recipes/office365-owa/webview.js | 5 |
2 files changed, 2 insertions, 5 deletions
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 @@ | |||
1 | { | 1 | { |
2 | "id": "office365-owa", | 2 | "id": "office365-owa", |
3 | "name": "Office 365 Outlook", | 3 | "name": "Office 365 Outlook", |
4 | "version": "1.6.1", | 4 | "version": "1.6.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "aliases": [ | 6 | "aliases": [ |
7 | "live.com", | 7 | "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) => { | |||
18 | const getMessages = () => { | 18 | const getMessages = () => { |
19 | let directUnreadCount = 0; | 19 | let directUnreadCount = 0; |
20 | let indirectUnreadCount = 0; | 20 | let indirectUnreadCount = 0; |
21 | |||
22 | if (/\/owa/.test(location.pathname)) { | 21 | if (/\/owa/.test(location.pathname)) { |
23 | // classic app | 22 | // classic app |
24 | directUnreadCount = Ferdium.safeParseInt( | 23 | directUnreadCount = Ferdium.safeParseInt( |
25 | document.querySelectorAll("span[title*='Inbox'] + div > span")[0] | 24 | document.querySelectorAll("span[title*='Inbox'] + div > span")[0]?.textContent |
26 | .textContent, | ||
27 | ); | 25 | ); |
28 | } else { | 26 | } else { |
29 | // new app | 27 | // new app |
@@ -37,6 +35,5 @@ module.exports = (Ferdium, settings) => { | |||
37 | 35 | ||
38 | Ferdium.setBadge(directUnreadCount, indirectUnreadCount); | 36 | Ferdium.setBadge(directUnreadCount, indirectUnreadCount); |
39 | }; | 37 | }; |
40 | |||
41 | Ferdium.loop(getMessages); | 38 | Ferdium.loop(getMessages); |
42 | }; | 39 | }; |