diff options
Diffstat (limited to 'recipes/workplace')
-rw-r--r-- | recipes/workplace/index.js | 2 | ||||
-rw-r--r-- | recipes/workplace/package.json | 2 | ||||
-rw-r--r-- | recipes/workplace/webview.js | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/recipes/workplace/index.js b/recipes/workplace/index.js index 23607bd..dd41f72 100644 --- a/recipes/workplace/index.js +++ b/recipes/workplace/index.js | |||
@@ -1 +1 @@ | |||
module.exports = Ferdi => Ferdi; | module.exports = Ferdium => Ferdium; | ||
diff --git a/recipes/workplace/package.json b/recipes/workplace/package.json index f730dd8..ac9918c 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.3.1", | 4 | "version": "1.4.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 90c6c27..8ee283b 100644 --- a/recipes/workplace/webview.js +++ b/recipes/workplace/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 => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | let direct = 0; | 9 | let direct = 0; |
10 | let indirect = 0; | 10 | let indirect = 0; |
@@ -12,7 +12,7 @@ module.exports = Ferdi => { | |||
12 | const notifications = document.querySelector('#notifications span span'); | 12 | const notifications = document.querySelector('#notifications span span'); |
13 | 13 | ||
14 | if (notifications) { | 14 | if (notifications) { |
15 | indirect = Ferdi.safeParseInt(notifications.textContent); | 15 | indirect = Ferdium.safeParseInt(notifications.textContent); |
16 | } | 16 | } |
17 | 17 | ||
18 | if (chatsElement) { | 18 | if (chatsElement) { |
@@ -20,7 +20,7 @@ module.exports = Ferdi => { | |||
20 | const chatMessages = chatsElement.querySelector('span'); | 20 | const chatMessages = chatsElement.querySelector('span'); |
21 | 21 | ||
22 | if (chatMessages) { | 22 | if (chatMessages) { |
23 | direct = Ferdi.safeParseInt(chatMessages.textContent); | 23 | direct = Ferdium.safeParseInt(chatMessages.textContent); |
24 | } | 24 | } |
25 | } else { | 25 | } else { |
26 | direct = document.querySelectorAll( | 26 | direct = document.querySelectorAll( |
@@ -29,20 +29,20 @@ module.exports = Ferdi => { | |||
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | Ferdi.setBadge(direct, indirect); | 32 | Ferdium.setBadge(direct, indirect); |
33 | }; | 33 | }; |
34 | 34 | ||
35 | Ferdi.loop(getMessages); | 35 | Ferdium.loop(getMessages); |
36 | 36 | ||
37 | Ferdi.injectCSS(_path.default.join(__dirname, 'workplace.css')); | 37 | Ferdium.injectCSS(_path.default.join(__dirname, 'workplace.css')); |
38 | 38 | ||
39 | localStorage._cs_desktopNotifsEnabled = JSON.stringify({ | 39 | localStorage._cs_desktopNotifsEnabled = JSON.stringify({ |
40 | __t: Date.now(), | 40 | __t: Date.now(), |
41 | __v: true, | 41 | __v: true, |
42 | }); | 42 | }); |
43 | 43 | ||
44 | if (typeof Ferdi.onNotify === 'function') { | 44 | if (typeof Ferdium.onNotify === 'function') { |
45 | Ferdi.onNotify(notification => { | 45 | Ferdium.onNotify(notification => { |
46 | if (typeof notification.title !== 'string') { | 46 | if (typeof notification.title !== 'string') { |
47 | notification.title = | 47 | notification.title = |
48 | ((notification.title.props || {}).content || [])[0] || 'Work Chat'; | 48 | ((notification.title.props || {}).content || [])[0] || 'Work Chat'; |