From 155c4b832281348c16be1f4ef667e6e23dbf1bd8 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Fri, 27 Aug 2021 18:13:24 +0530 Subject: chore: normalized all recipes to ensure compatibility with es6 (#639) - Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm. --- recipes/campuswire/webview.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'recipes/campuswire/webview.js') 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 @@ -module.exports = Franz => { +module.exports = Ferdi => { const getMessages = function getMessages() { let count = document.querySelectorAll('._5fx8:not(._569x),._1ht3:not(._569x)').length; const messageRequestsElement = document.querySelector('._5nxf'); @@ -7,17 +7,18 @@ module.exports = Franz => { count += parseInt(messageRequestsElement.innerHTML, 10); } - Franz.setBadge(count); + Ferdi.setBadge(count); }; - Franz.loop(getMessages); + Ferdi.loop(getMessages); + localStorage.setItem('_cs_desktopNotifsEnabled', JSON.stringify({ __t: new Date().getTime(), __v: true, })); - if (typeof Franz.onNotify === 'function') { - Franz.onNotify(notification => { + if (typeof Ferdi.onNotify === 'function') { + Ferdi.onNotify(notification => { if (typeof notification.title !== 'string') { notification.title = ((notification.title.props || {}).content || [])[0] || 'Campuswire'; } -- cgit v1.2.3-54-g00ecf