aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/campuswire
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/campuswire
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
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.
Diffstat (limited to 'recipes/campuswire')
-rw-r--r--recipes/campuswire/index.js2
-rw-r--r--recipes/campuswire/package.json2
-rw-r--r--recipes/campuswire/webview.js11
3 files changed, 8 insertions, 7 deletions
diff --git a/recipes/campuswire/index.js b/recipes/campuswire/index.js
index 258da41..23607bd 100644
--- a/recipes/campuswire/index.js
+++ b/recipes/campuswire/index.js
@@ -1 +1 @@
module.exports = Franz => Franz; module.exports = Ferdi => Ferdi;
diff --git a/recipes/campuswire/package.json b/recipes/campuswire/package.json
index 1e6670c..e305ef1 100644
--- a/recipes/campuswire/package.json
+++ b/recipes/campuswire/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "campuswire", 2 "id": "campuswire",
3 "name": "Campuswire", 3 "name": "Campuswire",
4 "version": "1.0.2", 4 "version": "1.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://campuswire.com/c", 7 "serviceURL": "https://campuswire.com/c",
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 }