diff options
Diffstat (limited to 'recipes/workplace')
-rw-r--r-- | recipes/workplace/package.json | 2 | ||||
-rw-r--r-- | recipes/workplace/webview.js | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/recipes/workplace/package.json b/recipes/workplace/package.json index ac9918c..fee0cb2 100644 --- a/recipes/workplace/package.json +++ b/recipes/workplace/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "workplace", | 2 | "id": "workplace", |
3 | "name": "Workplace", | 3 | "name": "Workplace", |
4 | "version": "1.4.0", | 4 | "version": "1.5.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://{teamId}.workplace.com/chat", | 7 | "serviceURL": "https://{teamId}.workplace.com/chat", |
diff --git a/recipes/workplace/webview.js b/recipes/workplace/webview.js index 8ee283b..d77cfed 100644 --- a/recipes/workplace/webview.js +++ b/recipes/workplace/webview.js | |||
@@ -1,9 +1,9 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { | 1 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | 2 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 3 | } |
6 | 4 | ||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | let direct = 0; | 9 | let direct = 0; |
@@ -16,16 +16,16 @@ module.exports = Ferdium => { | |||
16 | } | 16 | } |
17 | 17 | ||
18 | if (chatsElement) { | 18 | if (chatsElement) { |
19 | if (!chatsElement.hasAttribute('aria-current')) { | 19 | if (chatsElement.hasAttribute('aria-current')) { |
20 | direct = document.querySelectorAll( | ||
21 | '[data-pagelet="WorkGalahadChannel"] .uiList [role="gridcell"] [role="button"] .oxk9n0fw', | ||
22 | ).length; | ||
23 | } else { | ||
20 | const chatMessages = chatsElement.querySelector('span'); | 24 | const chatMessages = chatsElement.querySelector('span'); |
21 | 25 | ||
22 | if (chatMessages) { | 26 | if (chatMessages) { |
23 | direct = Ferdium.safeParseInt(chatMessages.textContent); | 27 | direct = Ferdium.safeParseInt(chatMessages.textContent); |
24 | } | 28 | } |
25 | } else { | ||
26 | direct = document.querySelectorAll( | ||
27 | '[data-pagelet="WorkGalahadChannel"] .uiList [role="gridcell"] [role="button"] .oxk9n0fw', | ||
28 | ).length; | ||
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||