diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
commit | 18801ed0c02627e87639dc0848cab44dacc18be2 (patch) | |
tree | 15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/office365-owa/webview.js | |
parent | Remove deprecated webPreference flag (diff) | |
download | ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.gz ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.zst ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.zip |
Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2)
Diffstat (limited to 'recipes/office365-owa/webview.js')
-rw-r--r-- | recipes/office365-owa/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/office365-owa/webview.js b/recipes/office365-owa/webview.js index 17649fd..70790f0 100644 --- a/recipes/office365-owa/webview.js +++ b/recipes/office365-owa/webview.js | |||
@@ -1,4 +1,4 @@ | |||
1 | module.exports = (Ferdi, settings) => { | 1 | module.exports = (Ferdium, settings) => { |
2 | const collectCounts = selector => { | 2 | const collectCounts = selector => { |
3 | let unreadCount = 0; | 3 | let unreadCount = 0; |
4 | const foldersElement = document.querySelector(selector); | 4 | const foldersElement = document.querySelector(selector); |
@@ -8,7 +8,7 @@ module.exports = (Ferdi, settings) => { | |||
8 | ); | 8 | ); |
9 | for (const child of allScreenReaders) { | 9 | for (const child of allScreenReaders) { |
10 | if (child.previousSibling) { | 10 | if (child.previousSibling) { |
11 | unreadCount += Ferdi.safeParseInt(child.previousSibling.textContent); | 11 | unreadCount += Ferdium.safeParseInt(child.previousSibling.textContent); |
12 | } | 12 | } |
13 | } | 13 | } |
14 | } | 14 | } |
@@ -21,7 +21,7 @@ module.exports = (Ferdi, settings) => { | |||
21 | 21 | ||
22 | if (/\/owa/.test(location.pathname)) { | 22 | if (/\/owa/.test(location.pathname)) { |
23 | // classic app | 23 | // classic app |
24 | directUnreadCount = Ferdi.safeParseInt( | 24 | directUnreadCount = Ferdium.safeParseInt( |
25 | document.querySelectorAll("span[title*='Inbox'] + div > span")[0] | 25 | document.querySelectorAll("span[title*='Inbox'] + div > span")[0] |
26 | .textContent, | 26 | .textContent, |
27 | ); | 27 | ); |
@@ -35,8 +35,8 @@ module.exports = (Ferdi, settings) => { | |||
35 | indirectUnreadCount = collectCounts('div[role=tree]:nth-child(4)'); // groups | 35 | indirectUnreadCount = collectCounts('div[role=tree]:nth-child(4)'); // groups |
36 | } | 36 | } |
37 | 37 | ||
38 | Ferdi.setBadge(directUnreadCount, indirectUnreadCount); | 38 | Ferdium.setBadge(directUnreadCount, indirectUnreadCount); |
39 | }; | 39 | }; |
40 | 40 | ||
41 | Ferdi.loop(getMessages); | 41 | Ferdium.loop(getMessages); |
42 | }; | 42 | }; |