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/slack/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/slack/webview.js')
-rw-r--r-- | recipes/slack/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/slack/webview.js b/recipes/slack/webview.js index 924784d..b3722f0 100644 --- a/recipes/slack/webview.js +++ b/recipes/slack/webview.js | |||
@@ -7,7 +7,7 @@ function _interopRequireDefault(obj) { | |||
7 | const SELECTOR_CHANNELS_UNREAD = | 7 | const SELECTOR_CHANNELS_UNREAD = |
8 | '.p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)'; | 8 | '.p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)'; |
9 | 9 | ||
10 | module.exports = Ferdi => { | 10 | module.exports = Ferdium => { |
11 | const getMessages = () => { | 11 | const getMessages = () => { |
12 | const directMessages = document.querySelectorAll( | 12 | const directMessages = document.querySelectorAll( |
13 | `${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]):not([data-sidebar-link-id="Pdrafts"]):not([data-sidebar-link-id="Pdms"])`, | 13 | `${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]):not([data-sidebar-link-id="Pdrafts"]):not([data-sidebar-link-id="Pdms"])`, |
@@ -15,7 +15,7 @@ module.exports = Ferdi => { | |||
15 | const allMessages = | 15 | const allMessages = |
16 | document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - | 16 | document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - |
17 | directMessages; | 17 | directMessages; |
18 | Ferdi.setBadge(directMessages, allMessages); | 18 | Ferdium.setBadge(directMessages, allMessages); |
19 | }; | 19 | }; |
20 | 20 | ||
21 | const getActiveDialogTitle = () => { | 21 | const getActiveDialogTitle = () => { |
@@ -23,7 +23,7 @@ module.exports = Ferdi => { | |||
23 | '.p-channel_sidebar__channel--selected .p-channel_sidebar__name', | 23 | '.p-channel_sidebar__channel--selected .p-channel_sidebar__name', |
24 | ); | 24 | ); |
25 | 25 | ||
26 | Ferdi.setDialogTitle( | 26 | Ferdium.setDialogTitle( |
27 | element && element.firstChild ? element.firstChild.textContent : null, | 27 | element && element.firstChild ? element.firstChild.textContent : null, |
28 | ); | 28 | ); |
29 | }; | 29 | }; |
@@ -33,7 +33,7 @@ module.exports = Ferdi => { | |||
33 | getActiveDialogTitle(); | 33 | getActiveDialogTitle(); |
34 | }; | 34 | }; |
35 | 35 | ||
36 | Ferdi.loop(loopFunc); | 36 | Ferdium.loop(loopFunc); |
37 | 37 | ||
38 | const getTeamIcon = function getTeamIcon(count = 0) { | 38 | const getTeamIcon = function getTeamIcon(count = 0) { |
39 | let countTeamIconCheck = count; | 39 | let countTeamIconCheck = count; |
@@ -62,7 +62,7 @@ module.exports = Ferdi => { | |||
62 | countTeamIconCheck += 1; | 62 | countTeamIconCheck += 1; |
63 | 63 | ||
64 | if (bgUrl) { | 64 | if (bgUrl) { |
65 | Ferdi.setAvatarImage(bgUrl); | 65 | Ferdium.setAvatarImage(bgUrl); |
66 | } else if (countTeamIconCheck <= 5) { | 66 | } else if (countTeamIconCheck <= 5) { |
67 | setTimeout(() => { | 67 | setTimeout(() => { |
68 | getTeamIcon(countTeamIconCheck + 1); | 68 | getTeamIcon(countTeamIconCheck + 1); |
@@ -74,5 +74,5 @@ module.exports = Ferdi => { | |||
74 | getTeamIcon(); | 74 | getTeamIcon(); |
75 | }, 4000); | 75 | }, 4000); |
76 | 76 | ||
77 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 77 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
78 | }; | 78 | }; |