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.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/recipes/campuswire/webview.js b/recipes/campuswire/webview.js
index b65f25a..5f43cbb 100644
--- a/recipes/campuswire/webview.js
+++ b/recipes/campuswire/webview.js
@@ -1,4 +1,4 @@
1module.exports = Franz => { 1module.exports = Ferdi => {
2 const getMessages = function getMessages() { 2 const getMessages = function getMessages() {
3 let count = document.querySelectorAll('._5fx8:not(._569x),._1ht3:not(._569x)').length; 3 let count = document.querySelectorAll('._5fx8:not(._569x),._1ht3:not(._569x)').length;
4 const messageRequestsElement = document.querySelector('._5nxf'); 4 const messageRequestsElement = document.querySelector('._5nxf');
@@ -7,17 +7,18 @@ module.exports = Franz => {
7 count += parseInt(messageRequestsElement.innerHTML, 10); 7 count += parseInt(messageRequestsElement.innerHTML, 10);
8 } 8 }
9 9
10 Franz.setBadge(count); 10 Ferdi.setBadge(count);
11 }; 11 };
12 12
13 Franz.loop(getMessages); 13 Ferdi.loop(getMessages);
14
14 localStorage.setItem('_cs_desktopNotifsEnabled', JSON.stringify({ 15 localStorage.setItem('_cs_desktopNotifsEnabled', JSON.stringify({
15 __t: new Date().getTime(), 16 __t: new Date().getTime(),
16 __v: true, 17 __v: true,
17 })); 18 }));
18 19
19 if (typeof Franz.onNotify === 'function') { 20 if (typeof Ferdi.onNotify === 'function') {
20 Franz.onNotify(notification => { 21 Ferdi.onNotify(notification => {
21 if (typeof notification.title !== 'string') { 22 if (typeof notification.title !== 'string') {
22 notification.title = ((notification.title.props || {}).content || [])[0] || 'Campuswire'; 23 notification.title = ((notification.title.props || {}).content || [])[0] || 'Campuswire';
23 } 24 }