aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/rocketchat/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-09-05 15:14:28 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-09-05 18:00:26 +0530
commita57a4edcb648d025254ede4d18d267b887ad0b8b (patch)
treec8b75e58cf108a55608f729218885abdb07fd42d /recipes/rocketchat/webview.js
parentAdd ability to use self-hosted option for 'youtrack' service (fixes #671) (diff)
downloadferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.tar.gz
ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.tar.zst
ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.zip
Remove dependency on 'require' of 'electron' and 'electron/remote' modules.
Instead, use the exposed content from the recipe model in main ferdi.
Diffstat (limited to 'recipes/rocketchat/webview.js')
-rw-r--r--recipes/rocketchat/webview.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/recipes/rocketchat/webview.js b/recipes/rocketchat/webview.js
index d3d0a27..4240935 100644
--- a/recipes/rocketchat/webview.js
+++ b/recipes/rocketchat/webview.js
@@ -1,5 +1,3 @@
1const { ipcRenderer } = require('electron');
2
3const getTeamIcon = function getTeamIcon() { 1const getTeamIcon = function getTeamIcon() {
4 const manifestElement = document.querySelector('link[rel="manifest"]'); 2 const manifestElement = document.querySelector('link[rel="manifest"]');
5 3
@@ -23,7 +21,7 @@ const getTeamIcon = function getTeamIcon() {
23 const response = JSON.parse(this.responseText); 21 const response = JSON.parse(this.responseText);
24 22
25 if (response.icons.length >= 1) { 23 if (response.icons.length >= 1) {
26 ipcRenderer.sendToHost( 24 Ferdi.ipcRenderer.sendToHost(
27 'avatar', 25 'avatar',
28 `${window.location.protocol}//${window.location.host}${response.icons[0].src}`, 26 `${window.location.protocol}//${window.location.host}${response.icons[0].src}`,
29 ); 27 );