aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/campuswire/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/campuswire/webview.js')
-rw-r--r--recipes/campuswire/webview.js12
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 @@
1module.exports = Ferdi => { 1module.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';