aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/slack/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'uncompressed/slack/webview.js')
-rw-r--r--uncompressed/slack/webview.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/uncompressed/slack/webview.js b/uncompressed/slack/webview.js
index 98c6136..174d81c 100644
--- a/uncompressed/slack/webview.js
+++ b/uncompressed/slack/webview.js
@@ -9,11 +9,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9const getTeamIcon = function getTeamIcon(count = 0) { 9const getTeamIcon = function getTeamIcon(count = 0) {
10 let countTeamIconCheck = count; 10 let countTeamIconCheck = count;
11 let bgUrl = null; 11 let bgUrl = null;
12 const teamMenu = document.querySelector('#team_menu'); 12 const teamMenu = document.querySelector('#team-menu-trigger');
13 13
14 if (teamMenu) { 14 if (teamMenu) {
15 teamMenu.click(); 15 teamMenu.click();
16 const icon = document.querySelector('.team_icon'); 16 const icon = document.querySelector('.c-team_icon');
17 17
18 if (icon) { 18 if (icon) {
19 bgUrl = window.getComputedStyle(icon, null).getPropertyValue('background-image'); 19 bgUrl = window.getComputedStyle(icon, null).getPropertyValue('background-image');
@@ -22,8 +22,7 @@ const getTeamIcon = function getTeamIcon(count = 0) {
22 } 22 }
23 23
24 setTimeout(() => { 24 setTimeout(() => {
25 document.querySelector('.team_menu').remove(); 25 document.querySelector('.ReactModal__Overlay').click();
26 document.querySelector('#msg_input .ql-editor').focus();
27 }, 10); 26 }, 10);
28 } 27 }
29 28
@@ -42,7 +41,7 @@ const SELECTOR_CHANNELS_UNREAD = '.p-channel_sidebar__channel--unread:not(.p-cha
42 41
43module.exports = Franz => { 42module.exports = Franz => {
44 const getMessages = () => { 43 const getMessages = () => {
45 const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge`).length; 44 const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread`).length;
46 const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages; 45 const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages;
47 Franz.setBadge(directMessages, allMessages); 46 Franz.setBadge(directMessages, allMessages);
48 }; 47 };