diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
commit | 18801ed0c02627e87639dc0848cab44dacc18be2 (patch) | |
tree | 15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/discord/webview.js | |
parent | Remove deprecated webPreference flag (diff) | |
download | ferdium-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/discord/webview.js')
-rw-r--r-- | recipes/discord/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index ab457c1..a72ef3a 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js | |||
@@ -4,7 +4,7 @@ function _interopRequireDefault(obj) { | |||
4 | return obj && obj.__esModule ? obj : { default: obj }; | 4 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 5 | } |
6 | 6 | ||
7 | module.exports = (Ferdi, settings) => { | 7 | module.exports = (Ferdium, settings) => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | let directCount = 0; | 9 | let directCount = 0; |
10 | const directCountPerServer = document.querySelectorAll( | 10 | const directCountPerServer = document.querySelectorAll( |
@@ -12,19 +12,19 @@ module.exports = (Ferdi, settings) => { | |||
12 | ); | 12 | ); |
13 | 13 | ||
14 | for (const directCountBadge of directCountPerServer) { | 14 | for (const directCountBadge of directCountPerServer) { |
15 | directCount += Ferdi.safeParseInt(directCountBadge.textContent); | 15 | directCount += Ferdium.safeParseInt(directCountBadge.textContent); |
16 | } | 16 | } |
17 | 17 | ||
18 | const indirectCountPerServer = document.querySelectorAll( | 18 | const indirectCountPerServer = document.querySelectorAll( |
19 | '[class*="modeUnread-"]', | 19 | '[class*="modeUnread-"]', |
20 | ).length; | 20 | ).length; |
21 | 21 | ||
22 | Ferdi.setBadge(directCount, indirectCountPerServer); | 22 | Ferdium.setBadge(directCount, indirectCountPerServer); |
23 | }; | 23 | }; |
24 | 24 | ||
25 | Ferdi.loop(getMessages); | 25 | Ferdium.loop(getMessages); |
26 | 26 | ||
27 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 27 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
28 | 28 | ||
29 | // TODO: This whole block is duplicated between the 'discord' and 'skype' recipes - reuse | 29 | // TODO: This whole block is duplicated between the 'discord' and 'skype' recipes - reuse |
30 | document.addEventListener( | 30 | document.addEventListener( |
@@ -43,7 +43,7 @@ module.exports = (Ferdi, settings) => { | |||
43 | event.stopPropagation(); | 43 | event.stopPropagation(); |
44 | // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message) | 44 | // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message) |
45 | // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/ferdium/ferdium-app/issues/1697) | 45 | // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/ferdium/ferdium-app/issues/1697) |
46 | let win = new Ferdi.BrowserWindow({ | 46 | let win = new Ferdium.BrowserWindow({ |
47 | width: 800, | 47 | width: 800, |
48 | height: window.innerHeight, | 48 | height: window.innerHeight, |
49 | minWidth: 600, | 49 | minWidth: 600, |