From 18801ed0c02627e87639dc0848cab44dacc18be2 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 18 Apr 2022 06:51:50 -0500 Subject: Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2) --- recipes/rocketchat/index.js | 2 +- recipes/rocketchat/package.json | 2 +- recipes/rocketchat/webview.js | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'recipes/rocketchat') 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 @@ -module.exports = Ferdi => class RocketChat extends Ferdi { +module.exports = Ferdium => class RocketChat extends Ferdium { async validateUrl(url) { try { 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 @@ { "id": "rocketchat", "name": "Rocket.Chat", - "version": "1.2.3", + "version": "1.3.0", "license": "MIT", "config": { "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 @@ -module.exports = Ferdi => { +module.exports = Ferdium => { const getMessages = () => { const directMessages = document.querySelectorAll('.rcx-badge'); let directMessagesCount = 0; for (const directMessage of directMessages) { - directMessagesCount += Ferdi.safeParseInt(directMessage.textContent); + directMessagesCount += Ferdium.safeParseInt(directMessage.textContent); } const indirectMessagesCount = Math.round( document.querySelectorAll('.rcx-sidebar-item--highlighted').length, ); - Ferdi.setBadge(directMessagesCount, indirectMessagesCount); + Ferdium.setBadge(directMessagesCount, indirectMessagesCount); }; - Ferdi.loop(getMessages); + Ferdium.loop(getMessages); const getTeamIcon = function getTeamIcon() { const manifestElement = document.querySelector('link[rel="manifest"]'); @@ -41,7 +41,7 @@ module.exports = Ferdi => { const response = JSON.parse(this.responseText); if (response.icons.length > 0) { - Ferdi.setAvatarImage(`${window.location.protocol}//${window.location.host}${response.icons[0].src}`); + Ferdium.setAvatarImage(`${window.location.protocol}//${window.location.host}${response.icons[0].src}`); } }); -- cgit v1.2.3-70-g09d2