aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/rocketchat
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
commit18801ed0c02627e87639dc0848cab44dacc18be2 (patch)
tree15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/rocketchat
parentRemove deprecated webPreference flag (diff)
downloadferdium-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/rocketchat')
-rw-r--r--recipes/rocketchat/index.js2
-rw-r--r--recipes/rocketchat/package.json2
-rw-r--r--recipes/rocketchat/webview.js10
3 files changed, 7 insertions, 7 deletions
diff --git a/recipes/rocketchat/index.js b/recipes/rocketchat/index.js
index 97de4fe..a7fee29 100644
--- a/recipes/rocketchat/index.js
+++ b/recipes/rocketchat/index.js
@@ -1,4 +1,4 @@
1module.exports = Ferdi => class RocketChat extends Ferdi { 1module.exports = Ferdium => class RocketChat extends Ferdium {
2 async validateUrl(url) { 2 async validateUrl(url) {
3 try { 3 try {
4 const resp = await window.fetch(url, { 4 const resp = await window.fetch(url, {
diff --git a/recipes/rocketchat/package.json b/recipes/rocketchat/package.json
index c44647a..17719ed 100644
--- a/recipes/rocketchat/package.json
+++ b/recipes/rocketchat/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "rocketchat", 2 "id": "rocketchat",
3 "name": "Rocket.Chat", 3 "name": "Rocket.Chat",
4 "version": "1.2.3", 4 "version": "1.3.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://{teamId}.rocket.chat", 7 "serviceURL": "https://{teamId}.rocket.chat",
diff --git a/recipes/rocketchat/webview.js b/recipes/rocketchat/webview.js
index 95ada6f..85b0c32 100644
--- a/recipes/rocketchat/webview.js
+++ b/recipes/rocketchat/webview.js
@@ -1,22 +1,22 @@
1 1
2module.exports = Ferdi => { 2module.exports = Ferdium => {
3 const getMessages = () => { 3 const getMessages = () => {
4 const directMessages = document.querySelectorAll('.rcx-badge'); 4 const directMessages = document.querySelectorAll('.rcx-badge');
5 5
6 let directMessagesCount = 0; 6 let directMessagesCount = 0;
7 7
8 for (const directMessage of directMessages) { 8 for (const directMessage of directMessages) {
9 directMessagesCount += Ferdi.safeParseInt(directMessage.textContent); 9 directMessagesCount += Ferdium.safeParseInt(directMessage.textContent);
10 } 10 }
11 11
12 const indirectMessagesCount = Math.round( 12 const indirectMessagesCount = Math.round(
13 document.querySelectorAll('.rcx-sidebar-item--highlighted').length, 13 document.querySelectorAll('.rcx-sidebar-item--highlighted').length,
14 ); 14 );
15 15
16 Ferdi.setBadge(directMessagesCount, indirectMessagesCount); 16 Ferdium.setBadge(directMessagesCount, indirectMessagesCount);
17 }; 17 };
18 18
19 Ferdi.loop(getMessages); 19 Ferdium.loop(getMessages);
20 20
21 const getTeamIcon = function getTeamIcon() { 21 const getTeamIcon = function getTeamIcon() {
22 const manifestElement = document.querySelector('link[rel="manifest"]'); 22 const manifestElement = document.querySelector('link[rel="manifest"]');
@@ -41,7 +41,7 @@ module.exports = Ferdi => {
41 const response = JSON.parse(this.responseText); 41 const response = JSON.parse(this.responseText);
42 42
43 if (response.icons.length > 0) { 43 if (response.icons.length > 0) {
44 Ferdi.setAvatarImage(`${window.location.protocol}//${window.location.host}${response.icons[0].src}`); 44 Ferdium.setAvatarImage(`${window.location.protocol}//${window.location.host}${response.icons[0].src}`);
45 } 45 }
46 }); 46 });
47 47