aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/slack/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/slack/webview.js')
-rw-r--r--recipes/slack/webview.js12
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) {
7const SELECTOR_CHANNELS_UNREAD = 7const 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
10module.exports = Ferdi => { 10module.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};