diff options
Diffstat (limited to 'recipes/rocketchat/webview.js')
-rw-r--r-- | recipes/rocketchat/webview.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/recipes/rocketchat/webview.js b/recipes/rocketchat/webview.js index 447b19b..1702c74 100644 --- a/recipes/rocketchat/webview.js +++ b/recipes/rocketchat/webview.js | |||
@@ -1,5 +1,3 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | const { ipcRenderer } = require('electron'); | 1 | const { ipcRenderer } = require('electron'); |
4 | 2 | ||
5 | const getTeamIcon = function getTeamIcon() { | 3 | const getTeamIcon = function getTeamIcon() { |
@@ -27,7 +25,7 @@ const getTeamIcon = function getTeamIcon() { | |||
27 | if (response.icons.length >= 1) { | 25 | if (response.icons.length >= 1) { |
28 | ipcRenderer.sendToHost( | 26 | ipcRenderer.sendToHost( |
29 | 'avatar', | 27 | 'avatar', |
30 | `${window.location.protocol}//${window.location.host}${response.icons[0].src}` | 28 | `${window.location.protocol}//${window.location.host}${response.icons[0].src}`, |
31 | ); | 29 | ); |
32 | } | 30 | } |
33 | }; | 31 | }; |
@@ -47,7 +45,7 @@ module.exports = Ferdi => { | |||
47 | } | 45 | } |
48 | 46 | ||
49 | const indirectMessagesCount = Math.round( | 47 | const indirectMessagesCount = Math.round( |
50 | document.querySelectorAll('.rcx-sidebar-item--highlighted').length | 48 | document.querySelectorAll('.rcx-sidebar-item--highlighted').length, |
51 | ); | 49 | ); |
52 | 50 | ||
53 | Ferdi.setBadge(directMessagesCount, indirectMessagesCount); | 51 | Ferdi.setBadge(directMessagesCount, indirectMessagesCount); |