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/campuswire/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/campuswire/webview.js')
-rw-r--r-- | recipes/campuswire/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/campuswire/webview.js b/recipes/campuswire/webview.js index 418ac9d..d77d162 100644 --- a/recipes/campuswire/webview.js +++ b/recipes/campuswire/webview.js | |||
@@ -1,4 +1,4 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | let count = document.querySelectorAll( | 3 | let count = document.querySelectorAll( |
4 | '._5fx8:not(._569x),._1ht3:not(._569x)', | 4 | '._5fx8:not(._569x),._1ht3:not(._569x)', |
@@ -6,13 +6,13 @@ module.exports = Ferdi => { | |||
6 | const messageRequestsElement = document.querySelector('._5nxf'); | 6 | const messageRequestsElement = document.querySelector('._5nxf'); |
7 | 7 | ||
8 | if (messageRequestsElement) { | 8 | if (messageRequestsElement) { |
9 | count += Ferdi.safeParseInt(messageRequestsElement.textContent); | 9 | count += Ferdium.safeParseInt(messageRequestsElement.textContent); |
10 | } | 10 | } |
11 | 11 | ||
12 | Ferdi.setBadge(count); | 12 | Ferdium.setBadge(count); |
13 | }; | 13 | }; |
14 | 14 | ||
15 | Ferdi.loop(getMessages); | 15 | Ferdium.loop(getMessages); |
16 | 16 | ||
17 | localStorage.setItem( | 17 | localStorage.setItem( |
18 | '_cs_desktopNotifsEnabled', | 18 | '_cs_desktopNotifsEnabled', |
@@ -22,8 +22,8 @@ module.exports = Ferdi => { | |||
22 | }), | 22 | }), |
23 | ); | 23 | ); |
24 | 24 | ||
25 | if (typeof Ferdi.onNotify === 'function') { | 25 | if (typeof Ferdium.onNotify === 'function') { |
26 | Ferdi.onNotify(notification => { | 26 | Ferdium.onNotify(notification => { |
27 | if (typeof notification.title !== 'string') { | 27 | if (typeof notification.title !== 'string') { |
28 | notification.title = | 28 | notification.title = |
29 | ((notification.title.props || {}).content || [])[0] || 'Campuswire'; | 29 | ((notification.title.props || {}).content || [])[0] || 'Campuswire'; |